Re: [PATCH v1 4/9] fs/fuse: support idmapped getattr inode op
From: Christian Brauner
Date: Sat Jan 20 2024 - 10:21:24 EST
> int fuse_update_attributes(struct inode *inode, struct file *file, u32 mask)
> {
> - return fuse_update_get_attr(inode, file, NULL, mask, 0);
> + return fuse_update_get_attr(&nop_mnt_idmap, inode, file, NULL, mask, 0);
> }
>
> int fuse_reverse_inval_entry(struct fuse_conn *fc, u64 parent_nodeid,
> @@ -1506,7 +1510,7 @@ static int fuse_perm_getattr(struct inode *inode, int mask)
> return -ECHILD;
>
> forget_all_cached_acls(inode);
> - return fuse_do_getattr(inode, NULL, NULL);
> + return fuse_do_getattr(&nop_mnt_idmap, inode, NULL, NULL);
> }
>
> /*
> @@ -2062,7 +2066,7 @@ static int fuse_setattr(struct mnt_idmap *idmap, struct dentry *entry,
> * ia_mode calculation may have used stale i_mode.
> * Refresh and recalculate.
> */
> - ret = fuse_do_getattr(inode, NULL, file);
> + ret = fuse_do_getattr(&nop_mnt_idmap, inode, NULL, file);
> if (ret)
> return ret;
These are internal getattr requests that don't originate from a specific mount?
Can you please add a comment about this in the commit message so it's
clear why it's ok to not pass the idmapping?