]> git.neil.brown.name Git - md.git/blobdiff - fs/ocfs2/locks.c
ocfs2: fix flock panic issue
[md.git] / fs / ocfs2 / locks.c
index 652ece4a9d9e2e90a72a95b4be1d910ea46cfc9f..d56f0079b858081241357b26667bf7fba9de5e3e 100644 (file)
@@ -67,7 +67,10 @@ static int ocfs2_do_flock(struct file *file, struct inode *inode,
                 */
 
                locks_lock_file_wait(file,
-                                    &(struct file_lock){.fl_type = F_UNLCK});
+                               &(struct file_lock) {
+                                       .fl_type = F_UNLCK,
+                                       .fl_flags = FL_FLOCK
+                               });
 
                ocfs2_file_unlock(file);
        }