mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-05 19:31:57 -04:00
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:
parent
fc2da88411
commit
ab752ebd97
2 changed files with 6 additions and 6 deletions
|
|
@ -329,7 +329,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
|
|||
|
||||
if (is_inode_flag_set(dir, FI_PROJ_INHERIT) &&
|
||||
(!projid_eq(F2FS_I(dir)->i_projid,
|
||||
F2FS_I(old_dentry->d_inode)->i_projid)))
|
||||
F2FS_I(inode)->i_projid)))
|
||||
return -EXDEV;
|
||||
|
||||
err = dquot_initialize(dir);
|
||||
|
|
@ -869,7 +869,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
|
||||
if (is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
||||
(!projid_eq(F2FS_I(new_dir)->i_projid,
|
||||
F2FS_I(old_dentry->d_inode)->i_projid)))
|
||||
F2FS_I(old_inode)->i_projid)))
|
||||
return -EXDEV;
|
||||
|
||||
if (flags & RENAME_WHITEOUT) {
|
||||
|
|
@ -1066,10 +1066,10 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
|
||||
if ((is_inode_flag_set(new_dir, FI_PROJ_INHERIT) &&
|
||||
!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) &&
|
||||
!projid_eq(F2FS_I(old_dir)->i_projid,
|
||||
F2FS_I(new_dentry->d_inode)->i_projid)))
|
||||
F2FS_I(new_inode)->i_projid)))
|
||||
return -EXDEV;
|
||||
|
||||
err = dquot_initialize(old_dir);
|
||||
|
|
|
|||
|
|
@ -1342,9 +1342,9 @@ static int f2fs_statfs(struct dentry *dentry, struct kstatfs *buf)
|
|||
buf->f_fsid.val[1] = (u32)(id >> 32);
|
||||
|
||||
#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)) {
|
||||
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
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue