aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteven Whitehouse2013-03-14 10:49:59 -0500
committerGreg Kroah-Hartman2013-04-16 23:48:28 -0500
commita7d0c9176bb6e15c483a020816b2ecb60716f79a (patch)
tree3889278c6c0260f1a7749ede49148deb5945b34a /fs
parentfccf4d03235294c978b2390a9ce575b33b0fbe5a (diff)
downloadkernel-omap-a7d0c9176bb6e15c483a020816b2ecb60716f79a.tar.gz
kernel-omap-a7d0c9176bb6e15c483a020816b2ecb60716f79a.tar.xz
kernel-omap-a7d0c9176bb6e15c483a020816b2ecb60716f79a.zip
GFS2: Fix unlock of fcntl locks during withdrawn state
commit c2952d202f710d326ac36a8ea6bd216b20615ec8 upstream. When withdraw occurs, we need to continue to allow unlocks of fcntl locks to occur, however these will only be local, since the node has withdrawn from the cluster. This prevents triggering a VFS level bug trap due to locks remaining when a file is closed. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/file.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 991ab2d484dd..7af426bbf601 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -924,8 +924,11 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
924 cmd = F_SETLK; 924 cmd = F_SETLK;
925 fl->fl_type = F_UNLCK; 925 fl->fl_type = F_UNLCK;
926 } 926 }
927 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) 927 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
928 if (fl->fl_type == F_UNLCK)
929 posix_lock_file_wait(file, fl);
928 return -EIO; 930 return -EIO;
931 }
929 if (IS_GETLK(cmd)) 932 if (IS_GETLK(cmd))
930 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); 933 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl);
931 else if (fl->fl_type == F_UNLCK) 934 else if (fl->fl_type == F_UNLCK)