Skip to content

Commit 1907e0f

Browse files
dhowellssmfrench
authored andcommitted
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: b8713c4 ("cifs: Add some helper functions") Signed-off-by: David Howells <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> cc: Shyam Prasad N <[email protected]> cc: Rohith Surabattula <[email protected]> cc: Tom Talpey <[email protected]> cc: Jeff Layton <[email protected]> cc: [email protected] Signed-off-by: Steve French <[email protected]>
1 parent ab7362d commit 1907e0f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

fs/cifs/file.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ static void cifs_undirty_folios(struct inode *inode, loff_t start, unsigned int
5252

5353
end = (start + len - 1) / PAGE_SIZE;
5454
xas_for_each_marked(&xas, folio, end, PAGECACHE_TAG_DIRTY) {
55+
if (xas_retry(&xas, folio))
56+
continue;
5557
xas_pause(&xas);
5658
rcu_read_unlock();
5759
folio_lock(folio);
@@ -81,6 +83,8 @@ void cifs_pages_written_back(struct inode *inode, loff_t start, unsigned int len
8183

8284
end = (start + len - 1) / PAGE_SIZE;
8385
xas_for_each(&xas, folio, end) {
86+
if (xas_retry(&xas, folio))
87+
continue;
8488
if (!folio_test_writeback(folio)) {
8589
WARN_ONCE(1, "bad %x @%llx page %lx %lx\n",
8690
len, start, folio_index(folio), end);
@@ -112,6 +116,8 @@ void cifs_pages_write_failed(struct inode *inode, loff_t start, unsigned int len
112116

113117
end = (start + len - 1) / PAGE_SIZE;
114118
xas_for_each(&xas, folio, end) {
119+
if (xas_retry(&xas, folio))
120+
continue;
115121
if (!folio_test_writeback(folio)) {
116122
WARN_ONCE(1, "bad %x @%llx page %lx %lx\n",
117123
len, start, folio_index(folio), end);

0 commit comments

Comments
 (0)