diff options
author | Shyam Prasad N <sprasad@microsoft.com> | 2021-08-10 13:22:28 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-08-25 23:45:10 +0300 |
commit | 18d04062f83b3eedb64e9f64ede26ee83ae7f152 (patch) | |
tree | c3c3adf374d89c8aac32520463468b715bd7e5e3 /fs/cifs/cifssmb.c | |
parent | 3d2b50e0e7682b2453ccfac775ad7c2c1d5ceb45 (diff) | |
download | linux-18d04062f83b3eedb64e9f64ede26ee83ae7f152.tar.xz |
cifs: enable fscache usage even for files opened as rw
So far, the fscache implementation we had supports only
a small set of use cases. Particularly for files opened
with O_RDONLY.
This commit enables it even for rw based file opens. It
also enables the reuse of cached data in case of mount
option (cache=singleclient) where it is guaranteed that
this is the only client (and server) which operates on
the files. There's also a single line change in fscache.c
to get around a bug seen in fscache.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 65d1a65bfc37..f207de803629 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -2101,6 +2101,7 @@ cifs_writev_complete(struct work_struct *work) else if (wdata->result < 0) SetPageError(page); end_page_writeback(page); + cifs_readpage_to_fscache(inode, page); put_page(page); } if (wdata->result != -EAGAIN) |