f2fs: use d_inode(dentry) cleanup dentry->d_inode
[ Upstream commit a6c397a31f58a1d577c2c8d04b624e9baa31951c ] no logic changes. Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
857b4d2bbe
commit
67b800b6d7
@@ -411,7 +411,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
|
|||||||
|
|
||||||
if (is_inode_flag_set(dir, FI_PROJ_INHERIT) &&
|
if (is_inode_flag_set(dir, FI_PROJ_INHERIT) &&
|
||||||
(!projid_eq(F2FS_I(dir)->i_projid,
|
(!projid_eq(F2FS_I(dir)->i_projid,
|
||||||
F2FS_I(old_dentry->d_inode)->i_projid)))
|
F2FS_I(inode)->i_projid)))
|
||||||
return -EXDEV;
|
return -EXDEV;
|
||||||
|
|
||||||
err = f2fs_dquot_initialize(dir);
|
err = f2fs_dquot_initialize(dir);
|
||||||
@@ -905,7 +905,7 @@ static int f2fs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
|
|||||||
|
|
||||||
if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
||||||
(!projid_eq(F2FS_I(new_dir)->i_projid,
|
(!projid_eq(F2FS_I(new_dir)->i_projid,
|
||||||
F2FS_I(old_dentry->d_inode)->i_projid)))
|
F2FS_I(old_inode)->i_projid)))
|
||||||
return -EXDEV;
|
return -EXDEV;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1101,10 +1101,10 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||||||
|
|
||||||
if ((is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
if ((is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
||||||
!projid_eq(F2FS_I(new_dir)->i_projid,
|
!projid_eq(F2FS_I(new_dir)->i_projid,
|
||||||
F2FS_I(old_dentry->d_inode)->i_projid)) ||
|
F2FS_I(old_inode)->i_projid)) ||
|
||||||
(is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
(is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
||||||
!projid_eq(F2FS_I(old_dir)->i_projid,
|
!projid_eq(F2FS_I(old_dir)->i_projid,
|
||||||
F2FS_I(new_dentry->d_inode)->i_projid)))
|
F2FS_I(new_inode)->i_projid)))
|
||||||
return -EXDEV;
|
return -EXDEV;
|
||||||
|
|
||||||
err = f2fs_dquot_initialize(old_dir);
|
err = f2fs_dquot_initialize(old_dir);
|
||||||
|
@@ -1849,9 +1849,9 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||||||
buf->f_fsid = u64_to_fsid(id);
|
buf->f_fsid = u64_to_fsid(id);
|
||||||
|
|
||||||
#ifdef CONFIG_QUOTA
|
#ifdef CONFIG_QUOTA
|
||||||
if (is_inode_flag_set(dentry->d_inode, FI_PROJ_INHERIT) &&
|
if (is_inode_flag_set(d_inode(dentry), FI_PROJ_INHERIT) &&
|
||||||
sb_has_quota_limits_enabled(sb, PRJQUOTA)) {
|
sb_has_quota_limits_enabled(sb, PRJQUOTA)) {
|
||||||
f2fs_statfs_project(sb, F2FS_I(dentry->d_inode)->i_projid, buf);
|
f2fs_statfs_project(sb, F2FS_I(d_inode(dentry))->i_projid, buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user