Message ID | 20240617221813.58244-1-21cnbao@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cifs: fix the incorrect assertion in cifs_swap_rw() | expand |
diff --git a/fs/smb/client/file.c b/fs/smb/client/file.c index 9d5c2440abfc..2f11f138c57d 100644 --- a/fs/smb/client/file.c +++ b/fs/smb/client/file.c @@ -3200,7 +3200,7 @@ static int cifs_swap_rw(struct kiocb *iocb, struct iov_iter *iter) { ssize_t ret; - WARN_ON_ONCE(iov_iter_count(iter) != PAGE_SIZE); + WARN_ON_ONCE(iov_iter_count(iter) != iov_iter_npages(iter, INT_MAX) * PAGE_SIZE); if (iov_iter_rw(iter) == READ) ret = netfs_unbuffered_read_iter_locked(iocb, iter);