diff options
author | Jeffle Xu <jefflexu@linux.alibaba.com> | 2021-12-07 11:14:49 +0800 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2021-12-07 15:47:09 +0000 |
commit | 3cfef1b612e15a0c2f5b1c9d3f3f31ad72d56fcd (patch) | |
tree | f628eff53c3001c064b42e214c82d24abe678d85 /fs/netfs | |
parent | 598ad0bd09329818ee041cb3e4b60ba0a70cb1ee (diff) | |
download | linux-stable-3cfef1b612e15a0c2f5b1c9d3f3f31ad72d56fcd.tar.gz linux-stable-3cfef1b612e15a0c2f5b1c9d3f3f31ad72d56fcd.tar.bz2 linux-stable-3cfef1b612e15a0c2f5b1c9d3f3f31ad72d56fcd.zip |
netfs: fix parameter of cleanup()
The order of these two parameters is just reversed. gcc didn't warn on
that, probably because 'void *' can be converted from or to other
pointer types without warning.
Cc: stable@vger.kernel.org
Fixes: 3d3c95046742 ("netfs: Provide readahead and readpage netfs helpers")
Fixes: e1b1240c1ff5 ("netfs: Add write_begin helper")
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Link: https://lore.kernel.org/r/20211207031449.100510-1-jefflexu@linux.alibaba.com/ # v1
Diffstat (limited to 'fs/netfs')
-rw-r--r-- | fs/netfs/read_helper.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/netfs/read_helper.c b/fs/netfs/read_helper.c index 7c6e199618af..75c76cbb27cc 100644 --- a/fs/netfs/read_helper.c +++ b/fs/netfs/read_helper.c @@ -955,7 +955,7 @@ int netfs_readpage(struct file *file, rreq = netfs_alloc_read_request(ops, netfs_priv, file); if (!rreq) { if (netfs_priv) - ops->cleanup(netfs_priv, folio_file_mapping(folio)); + ops->cleanup(folio_file_mapping(folio), netfs_priv); folio_unlock(folio); return -ENOMEM; } @@ -1186,7 +1186,7 @@ have_folio: goto error; have_folio_no_wait: if (netfs_priv) - ops->cleanup(netfs_priv, mapping); + ops->cleanup(mapping, netfs_priv); *_folio = folio; _leave(" = 0"); return 0; @@ -1197,7 +1197,7 @@ error: folio_unlock(folio); folio_put(folio); if (netfs_priv) - ops->cleanup(netfs_priv, mapping); + ops->cleanup(mapping, netfs_priv); _leave(" = %d", ret); return ret; } |