aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2013-03-14 11:49:59 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2013-04-04 04:53:46 -0400
commitc2952d202f710d326ac36a8ea6bd216b20615ec8 (patch)
treec7bb17e1d290ba8dd391f9567003173da7af4831 /fs/gfs2/file.c
parent441362d06be349430d06e37286adce4b90e6ce96 (diff)
GFS2: Fix unlock of fcntl locks during withdrawn state
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>
Diffstat (limited to 'fs/gfs2/file.c')
-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 019f45e45097..d79c2dadc536 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -923,8 +923,11 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
923 cmd = F_SETLK; 923 cmd = F_SETLK;
924 fl->fl_type = F_UNLCK; 924 fl->fl_type = F_UNLCK;
925 } 925 }
926 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) 926 if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
927 if (fl->fl_type == F_UNLCK)
928 posix_lock_file_wait(file, fl);
927 return -EIO; 929 return -EIO;
930 }
928 if (IS_GETLK(cmd)) 931 if (IS_GETLK(cmd))
929 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); 932 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl);
930 else if (fl->fl_type == F_UNLCK) 933 else if (fl->fl_type == F_UNLCK)