diff options
author | Chengyu Song <csong84@gatech.edu> | 2015-03-24 20:18:49 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2015-05-20 14:08:33 -0400 |
commit | 00b8c95b680791a72b4bb14dc371ff1f1daae39c (patch) | |
tree | 0b7d97ae5c7dd4d9d11aeb48e3d05d30a61d3743 | |
parent | 7196ac113a4f38b7ca1a3282fd9edf328bd22287 (diff) |
cifs: potential missing check for posix_lock_file_wait
posix_lock_file_wait may fail under certain circumstances, and its result is
usually checked/returned. But given the complexity of cifs, I'm not sure if
the result is intentially left unchecked and always expected to succeed.
Signed-off-by: Chengyu Song <csong84@gatech.edu>
Acked-by: Jeff Layton <jeff.layton@primarydata.com>
Signed-off-by: Steve French <smfrench@gmail.com>
-rw-r--r-- | fs/cifs/file.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 5cfa7129d876..3f50cee79df9 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -1552,8 +1552,8 @@ cifs_setlk(struct file *file, struct file_lock *flock, __u32 type, | |||
1552 | rc = server->ops->mand_unlock_range(cfile, flock, xid); | 1552 | rc = server->ops->mand_unlock_range(cfile, flock, xid); |
1553 | 1553 | ||
1554 | out: | 1554 | out: |
1555 | if (flock->fl_flags & FL_POSIX) | 1555 | if (flock->fl_flags & FL_POSIX && !rc) |
1556 | posix_lock_file_wait(file, flock); | 1556 | rc = posix_lock_file_wait(file, flock); |
1557 | return rc; | 1557 | return rc; |
1558 | } | 1558 | } |
1559 | 1559 | ||