diff mbox

[V9fs-developer] Fwd: [PATCH] v9fs: Skip check for mandatory locks when unlocking

Message ID a4e6962a1003130639w61da6f13ud47d2272e6a4f09b@mail.gmail.com (mailing list archive)
State Accepted, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

Eric Van Hensbergen March 13, 2010, 2:39 p.m. UTC
None
diff mbox

Patch

diff -up linux-2.6/fs/9p/vfs_file.c.9p linux-2.6/fs/9p/vfs_file.c
--- linux-2.6/fs/9p/vfs_file.c.9p       2010-03-11 17:32:52.000000000 +0000
+++ linux-2.6/fs/9p/vfs_file.c  2010-03-11 17:33:11.000000000 +0000
@@ -114,7 +114,7 @@  static int v9fs_file_lock(struct file *f
       P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);

       /* No mandatory locks */
-       if (__mandatory_lock(inode))
+       if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK)
               return -ENOLCK;

       if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) {