Skip to content

Commit cacc064

Browse files
joannekoongMiklos Szeredi
authored andcommitted
fuse: support large folios for symlinks
Support large folios for symlinks and change the name from fuse_getlink_page() to fuse_getlink_folio(). Signed-off-by: Joanne Koong <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Reviewed-by: Bernd Schubert <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]>
1 parent 351a24e commit cacc064

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/fuse/dir.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,10 +1629,10 @@ static int fuse_permission(struct mnt_idmap *idmap,
16291629
return err;
16301630
}
16311631

1632-
static int fuse_readlink_page(struct inode *inode, struct folio *folio)
1632+
static int fuse_readlink_folio(struct inode *inode, struct folio *folio)
16331633
{
16341634
struct fuse_mount *fm = get_fuse_mount(inode);
1635-
struct fuse_folio_desc desc = { .length = PAGE_SIZE - 1 };
1635+
struct fuse_folio_desc desc = { .length = folio_size(folio) - 1 };
16361636
struct fuse_args_pages ap = {
16371637
.num_folios = 1,
16381638
.folios = &folio,
@@ -1687,7 +1687,7 @@ static const char *fuse_get_link(struct dentry *dentry, struct inode *inode,
16871687
if (!folio)
16881688
goto out_err;
16891689

1690-
err = fuse_readlink_page(inode, folio);
1690+
err = fuse_readlink_folio(inode, folio);
16911691
if (err) {
16921692
folio_put(folio);
16931693
goto out_err;
@@ -2288,7 +2288,7 @@ void fuse_init_dir(struct inode *inode)
22882288

22892289
static int fuse_symlink_read_folio(struct file *null, struct folio *folio)
22902290
{
2291-
int err = fuse_readlink_page(folio->mapping->host, folio);
2291+
int err = fuse_readlink_folio(folio->mapping->host, folio);
22922292

22932293
if (!err)
22942294
folio_mark_uptodate(folio);

0 commit comments

Comments
 (0)