GFS2: Skip check for mandatory locks when unlocking
[deliverable/linux.git] / fs / gfs2 / file.c
index a6abbae8a278cefb0ae39fe4553341a5ce85ebef..e6dd2aec6f822fe1ffa6cc8d442bd1dd03ca496f 100644 (file)
@@ -640,7 +640,7 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
 
        if (!(fl->fl_flags & FL_POSIX))
                return -ENOLCK;
-       if (__mandatory_lock(&ip->i_inode))
+       if (__mandatory_lock(&ip->i_inode) && fl->fl_type != F_UNLCK)
                return -ENOLCK;
 
        if (cmd == F_CANCELLK) {
This page took 0.029324 seconds and 5 git commands to generate.