]> Pileus Git - ~andy/linux/blobdiff - fs/gfs2/file.c
Merge branch 'fix/pcm-hwptr' into for-linus
[~andy/linux] / fs / gfs2 / file.c
index 73b6f552f06dd8f7960496fd0be10164e8f4299f..73318a3ce6f1b1651f7fdaeb2ec985c45e7f76e0 100644 (file)
@@ -694,12 +694,10 @@ static void do_unflock(struct file *file, struct file_lock *fl)
 
 static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
 {
-       struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
-
        if (!(fl->fl_flags & FL_FLOCK))
                return -ENOLCK;
-       if (__mandatory_lock(&ip->i_inode))
-               return -ENOLCK;
+       if (fl->fl_type & LOCK_MAND)
+               return -EOPNOTSUPP;
 
        if (fl->fl_type == F_UNLCK) {
                do_unflock(file, fl);