ANDROID: sdcardfs: Get the blocksize from the lower fs
This changes sdcardfs to be more in line with the getattr in wrapfs, which calls the lower fs's getattr to get the block size Signed-off-by: Daniel Rosenberg <drosen@google.com> Bug: 34723223 Change-Id: I1c9e16604ba580a8cdefa17f02dcc489d7351aed
This commit is contained in:
parent
a45a1bba60
commit
ca3019310f
1 changed files with 9 additions and 12 deletions
|
@ -865,9 +865,7 @@ static int sdcardfs_fillattr(struct vfsmount *mnt, struct inode *inode, struct k
|
|||
static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
struct kstat *stat)
|
||||
{
|
||||
struct dentry *lower_dentry;
|
||||
struct inode *inode;
|
||||
struct inode *lower_inode;
|
||||
struct kstat lower_stat;
|
||||
struct path lower_path;
|
||||
struct dentry *parent;
|
||||
int err;
|
||||
|
@ -882,16 +880,15 @@ static int sdcardfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
|||
}
|
||||
dput(parent);
|
||||
|
||||
inode = d_inode(dentry);
|
||||
|
||||
sdcardfs_get_lower_path(dentry, &lower_path);
|
||||
lower_dentry = lower_path.dentry;
|
||||
lower_inode = sdcardfs_lower_inode(inode);
|
||||
|
||||
sdcardfs_copy_and_fix_attrs(inode, lower_inode);
|
||||
fsstack_copy_inode_size(inode, lower_inode);
|
||||
|
||||
err = sdcardfs_fillattr(mnt, inode, stat);
|
||||
err = vfs_getattr(&lower_path, &lower_stat);
|
||||
if (err)
|
||||
goto out;
|
||||
sdcardfs_copy_and_fix_attrs(d_inode(dentry),
|
||||
d_inode(lower_path.dentry));
|
||||
err = sdcardfs_fillattr(mnt, d_inode(dentry), stat);
|
||||
stat->blocks = lower_stat.blocks;
|
||||
out:
|
||||
sdcardfs_put_lower_path(dentry, &lower_path);
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue