smb3: Miscellaneous fixes
Subsystems (3)
cover smb3: Miscellaneous fixes
Hi Steve,
Here are a couple of fix patches for you.
I've pushed the patches here also:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=iov-cifs
David
David Howells (2):
cifs: Add some missing xas_retry() calls
cifs: Fix an uninitialised variable
fs/cifs/file.c | 6 ++++++ fs/cifs/smbdirect.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
PATCH 1/2 cifs: Add some missing xas_retry() calls
The xas_for_each loops added into fs/cifs/file.c need to go round again if indicated by xas_retry().
Fixes 5f0955c98375 ("cifs: Add some helper functions")
Signed-off-by David Howells <[email protected]>
cc Steve French <[email protected]>
cc Shyam Prasad N <[email protected]>
cc Rohith Surabattula <[email protected]>
cc Tom Talpey <[email protected]>
cc Jeff Layton <[email protected]>
--- fs/cifs/file.c | 6 ++++++ 1 file changed, 6 insertions(+)
fs/cifs/file.c +6 -0
@@ -52,6 +52,8 @@ static void cifs_undirty_folios(struct inode *inode, loff_t start, unsigned int end = (start + len -1 ) /PAGE_SIZE ;xas_for_each_marked (&xas, folio, end,PAGECACHE_TAG_DIRTY ) { +if (xas_retry (&xas, folio)) +continue ;xas_pause (&xas);rcu_read_unlock ();folio_lock (folio);
@@ -81,6 +83,8 @@ void cifs_pages_written_back(struct inode *inode, loff_t start, unsigned int len end = (start + len -1 ) /PAGE_SIZE ;xas_for_each (&xas, folio, end) { +if (xas_retry (&xas, folio)) +continue ;if (!folio_test_writeback (folio)) {WARN_ONCE (1 ,"bad %x @%llx page %lx %lx\n" , len, start,folio_index (folio), end);
@@ -112,6 +116,8 @@ void cifs_pages_write_failed(struct inode *inode, loff_t start, unsigned int len end = (start + len -1 ) /PAGE_SIZE ;xas_for_each (&xas, folio, end) { +if (xas_retry (&xas, folio)) +continue ;if (!folio_test_writeback (folio)) {WARN_ONCE (1 ,"bad %x @%llx page %lx %lx\n" , len, start,folio_index (folio), end);
PATCH 2/2 cifs: Fix an uninitialised variable
In reply to David HowellsFix an uninitialised variable introduced in cifs.
Fixes 3d78fe73fa12 ("cifs: Build the RDMA SGE list directly from an iterator")
Signed-off-by David Howells <[email protected]>
cc Steve French <[email protected]>
cc Shyam Prasad N <[email protected]>
cc Rohith Surabattula <[email protected]>
cc Tom Talpey <[email protected]>
cc Jeff Layton <[email protected]>
--- fs/cifs/smbdirect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smbdirect.c +1 -1
@@ -837,7 +837,7 @@ static int smbd_post_send_iter(struct smbd_connection *info,int data_length;struct smbd_request *request;struct smbd_data_transfer *packet; -int new_credits; +int new_credits =0 ; wait_credit:/* Wait for send credits. A SMBD packet needs one credit */