f2fs: remove the redundant function cond_clear_inode_flag
Use clear_inode_flag to replace the redundant cond_clear_inode_flag. Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
8a2d0ace3a
commit
fa528722d0
2 changed files with 2 additions and 11 deletions
|
@ -236,7 +236,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
|
||||||
if (acl) {
|
if (acl) {
|
||||||
value = f2fs_acl_to_disk(acl, &size);
|
value = f2fs_acl_to_disk(acl, &size);
|
||||||
if (IS_ERR(value)) {
|
if (IS_ERR(value)) {
|
||||||
cond_clear_inode_flag(fi, FI_ACL_MODE);
|
clear_inode_flag(fi, FI_ACL_MODE);
|
||||||
return (int)PTR_ERR(value);
|
return (int)PTR_ERR(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -247,7 +247,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
|
||||||
if (!error)
|
if (!error)
|
||||||
set_cached_acl(inode, type, acl);
|
set_cached_acl(inode, type, acl);
|
||||||
|
|
||||||
cond_clear_inode_flag(fi, FI_ACL_MODE);
|
clear_inode_flag(fi, FI_ACL_MODE);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1117,15 +1117,6 @@ static inline void set_acl_inode(struct f2fs_inode_info *fi, umode_t mode)
|
||||||
set_inode_flag(fi, FI_ACL_MODE);
|
set_inode_flag(fi, FI_ACL_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int cond_clear_inode_flag(struct f2fs_inode_info *fi, int flag)
|
|
||||||
{
|
|
||||||
if (is_inode_flag_set(fi, FI_ACL_MODE)) {
|
|
||||||
clear_inode_flag(fi, FI_ACL_MODE);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline void get_inline_info(struct f2fs_inode_info *fi,
|
static inline void get_inline_info(struct f2fs_inode_info *fi,
|
||||||
struct f2fs_inode *ri)
|
struct f2fs_inode *ri)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue