summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-03 13:35:20 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-05-08 14:28:45 -0400
commit27a77913448fe976f7c1d5e4b5467a5fa1b2a195 (patch)
tree19b09038d7d7491f94760771dca1ab5d41c1c6c8 /fs/namei.c
parent53b524b83d17ac857e8904afac9f28def691fca3 (diff)
namei: Call aops write_begin() and write_end() directly
pagecache_write_begin() and pagecache_write_end() are now trivial wrappers, so call the aops directly. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 0c84b4326dc9..896ade8b7400 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -5005,6 +5005,7 @@ EXPORT_SYMBOL(page_readlink);
int page_symlink(struct inode *inode, const char *symname, int len)
{
struct address_space *mapping = inode->i_mapping;
+ const struct address_space_operations *aops = mapping->a_ops;
bool nofs = !mapping_gfp_constraint(mapping, __GFP_FS);
struct page *page;
void *fsdata;
@@ -5014,8 +5015,7 @@ int page_symlink(struct inode *inode, const char *symname, int len)
retry:
if (nofs)
flags = memalloc_nofs_save();
- err = pagecache_write_begin(NULL, mapping, 0, len-1,
- 0, &page, &fsdata);
+ err = aops->write_begin(NULL, mapping, 0, len-1, &page, &fsdata);
if (nofs)
memalloc_nofs_restore(flags);
if (err)
@@ -5023,7 +5023,7 @@ retry:
memcpy(page_address(page), symname, len-1);
- err = pagecache_write_end(NULL, mapping, 0, len-1, len-1,
+ err = aops->write_end(NULL, mapping, 0, len-1, len-1,
page, fsdata);
if (err < 0)
goto fail;