GFS2: Skip check for mandatory locks when unlocking
commit788b99c41012b7bdee8e43c79b081a92161ef8de
authorSachin Prabhu <sprabhu@redhat.com>
Thu, 11 Mar 2010 17:24:45 +0000 (11 12:24 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 1 Apr 2010 22:58:57 +0000 (1 15:58 -0700)
tree025ef998e6f36fd94958368d12d9360c2d493168
parent847d52cc4a3e149949df66d7484aba999dc61e19
GFS2: Skip check for mandatory locks when unlocking

commit 720e7749279bde0d08684b1bb4e7a2eedeec6394 upstream.

gfs2_lock() will skip locks on file which have mode set to 02666. This is a problem in cases where the mode of the file is changed after a process has obtained a lock on the file. Such a lock will be skipped and will result in a BUG in locks_remove_flock().

gfs2_lock() should skip the check for mandatory locks when unlocking a file.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/gfs2/file.c