diff options
author | Pavel Shilovsky <pshilov@microsoft.com> | 2019-01-29 21:15:11 +0100 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-03-06 01:10:04 +0100 |
commit | fe768d51c832ebde70a83221b0633dc7bc9640a6 (patch) | |
tree | 06304ab7a40e0372eb79a3af3014e59c4eadc4d0 /fs/cifs/cifsproto.h | |
parent | CIFS: Move open file handling to writepages (diff) | |
download | linux-fe768d51c832ebde70a83221b0633dc7bc9640a6.tar.xz linux-fe768d51c832ebde70a83221b0633dc7bc9640a6.zip |
CIFS: Return error code when getting file handle for writeback
Now we just return NULL cifsFileInfo pointer in cases we didn't find
or couldn't reopen a file. This hides errors from cifs_reopen_file()
especially retryable errors which should be handled appropriately.
Create new cifs_get_writable_file() routine that returns error codes
from cifs_reopen_file() and use it in the writeback codepath.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r-- | fs/cifs/cifsproto.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 9e8394fee29e..4f96b3b00a7a 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h @@ -134,6 +134,9 @@ extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); extern void cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset, unsigned int bytes_written); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *, bool); +extern int cifs_get_writable_file(struct cifsInodeInfo *cifs_inode, + bool fsuid_only, + struct cifsFileInfo **ret_file); extern struct cifsFileInfo *find_readable_file(struct cifsInodeInfo *, bool); extern unsigned int smbCalcSize(void *buf, struct TCP_Server_Info *server); extern int decode_negTokenInit(unsigned char *security_blob, int length, |