summaryrefslogtreecommitdiff
path: root/fs/ksmbd/vfs.c
diff options
context:
space:
mode:
authorHyunchul Lee <hyc.lee@gmail.com>2021-07-10 09:34:20 +0900
committerNamjae Jeon <namjae.jeon@samsung.com>2021-07-10 16:23:56 +0900
commit45a64e8b08493b768fa029a5508cec8cf2b89f2d (patch)
tree037e63043456953d5c0cb5123c894f6ded61cf8f /fs/ksmbd/vfs.c
parentd63528eb0d43c4796c42aad56889dec12cf4e122 (diff)
ksmbd: uninterruptible wait for a file being unlocked
the wait can be canceled by SMB2_CANCEL, SMB2_CLOSE, SMB2_LOGOFF, disconnection or shutdown, we don't have to use wait_event_interruptible. And this remove the warning from Coverity: CID 1502834 (#1 of 1): Unused value (UNUSED_VALUE) returned_value: Assigning value from ksmbd_vfs_posix_lock_wait(flock) to err here, but that stored value is overwritten before it can be used. Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/vfs.c')
-rw-r--r--fs/ksmbd/vfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ksmbd/vfs.c b/fs/ksmbd/vfs.c
index 38677c20d048..88e947f69f47 100644
--- a/fs/ksmbd/vfs.c
+++ b/fs/ksmbd/vfs.c
@@ -1784,9 +1784,9 @@ int ksmbd_vfs_copy_file_ranges(struct ksmbd_work *work,
return 0;
}
-int ksmbd_vfs_posix_lock_wait(struct file_lock *flock)
+void ksmbd_vfs_posix_lock_wait(struct file_lock *flock)
{
- return wait_event_interruptible(flock->fl_wait, !flock->fl_blocker);
+ wait_event(flock->fl_wait, !flock->fl_blocker);
}
int ksmbd_vfs_posix_lock_wait_timeout(struct file_lock *flock, long timeout)