mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
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:3d3c950467
("netfs: Provide readahead and readpage netfs helpers") Fixes:e1b1240c1f
("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
This commit is contained in:
parent
598ad0bd09
commit
3cfef1b612
1 changed files with 3 additions and 3 deletions
|
@ -955,7 +955,7 @@ int netfs_readpage(struct file *file,
|
||||||
rreq = netfs_alloc_read_request(ops, netfs_priv, file);
|
rreq = netfs_alloc_read_request(ops, netfs_priv, file);
|
||||||
if (!rreq) {
|
if (!rreq) {
|
||||||
if (netfs_priv)
|
if (netfs_priv)
|
||||||
ops->cleanup(netfs_priv, folio_file_mapping(folio));
|
ops->cleanup(folio_file_mapping(folio), netfs_priv);
|
||||||
folio_unlock(folio);
|
folio_unlock(folio);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
@ -1186,7 +1186,7 @@ int netfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
goto error;
|
goto error;
|
||||||
have_folio_no_wait:
|
have_folio_no_wait:
|
||||||
if (netfs_priv)
|
if (netfs_priv)
|
||||||
ops->cleanup(netfs_priv, mapping);
|
ops->cleanup(mapping, netfs_priv);
|
||||||
*_folio = folio;
|
*_folio = folio;
|
||||||
_leave(" = 0");
|
_leave(" = 0");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1197,7 +1197,7 @@ int netfs_write_begin(struct file *file, struct address_space *mapping,
|
||||||
folio_unlock(folio);
|
folio_unlock(folio);
|
||||||
folio_put(folio);
|
folio_put(folio);
|
||||||
if (netfs_priv)
|
if (netfs_priv)
|
||||||
ops->cleanup(netfs_priv, mapping);
|
ops->cleanup(mapping, netfs_priv);
|
||||||
_leave(" = %d", ret);
|
_leave(" = %d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue