Commit c2952d202f710d326ac36a8ea6bd216b20615ec8
1 parent
441362d06b
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
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>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
fs/gfs2/file.c
... | ... | @@ -923,8 +923,11 @@ |
923 | 923 | cmd = F_SETLK; |
924 | 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 | 929 | return -EIO; |
930 | + } | |
928 | 931 | if (IS_GETLK(cmd)) |
929 | 932 | return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); |
930 | 933 | else if (fl->fl_type == F_UNLCK) |