diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2013-03-14 15:49:59 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2013-04-04 09:53:46 +0100 |
commit | c2952d202f710d326ac36a8ea6bd216b20615ec8 (patch) | |
tree | c7bb17e1d290ba8dd391f9567003173da7af4831 /fs | |
parent | 441362d06be349430d06e37286adce4b90e6ce96 (diff) | |
download | linux-exynos-c2952d202f710d326ac36a8ea6bd216b20615ec8.tar.gz linux-exynos-c2952d202f710d326ac36a8ea6bd216b20615ec8.tar.bz2 linux-exynos-c2952d202f710d326ac36a8ea6bd216b20615ec8.zip |
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')
-rw-r--r-- | fs/gfs2/file.c | 5 |
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) cmd = F_SETLK; fl->fl_type = F_UNLCK; } - if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) + if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) { + if (fl->fl_type == F_UNLCK) + posix_lock_file_wait(file, fl); return -EIO; + } if (IS_GETLK(cmd)) return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); else if (fl->fl_type == F_UNLCK) |