Gu Zheng
2014-10-20 09:45:52 UTC
Use clear_inode_flag to replace the redundant cond_clear_inode_flag.
Signed-off-by: Gu Zheng <***@cn.fujitsu.com>
---
fs/f2fs/acl.c | 4 ++--
fs/f2fs/f2fs.h | 9 ---------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 83b9b5a..e8d78fb 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -229,7 +229,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
if (acl) {
value = f2fs_acl_to_disk(acl, &size);
if (IS_ERR(value)) {
- cond_clear_inode_flag(fi, FI_ACL_MODE);
+ clear_inode_flag(fi, FI_ACL_MODE);
return (int)PTR_ERR(value);
}
}
@@ -240,7 +240,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
if (!error)
set_cached_acl(inode, type, acl);
- cond_clear_inode_flag(fi, FI_ACL_MODE);
+ clear_inode_flag(fi, FI_ACL_MODE);
return error;
}
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 0aef88f..d227dc6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1096,15 +1096,6 @@ static inline void set_acl_inode(struct f2fs_inode_info *fi, umode_t 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,
struct f2fs_inode *ri)
{
Signed-off-by: Gu Zheng <***@cn.fujitsu.com>
---
fs/f2fs/acl.c | 4 ++--
fs/f2fs/f2fs.h | 9 ---------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 83b9b5a..e8d78fb 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -229,7 +229,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
if (acl) {
value = f2fs_acl_to_disk(acl, &size);
if (IS_ERR(value)) {
- cond_clear_inode_flag(fi, FI_ACL_MODE);
+ clear_inode_flag(fi, FI_ACL_MODE);
return (int)PTR_ERR(value);
}
}
@@ -240,7 +240,7 @@ static int __f2fs_set_acl(struct inode *inode, int type,
if (!error)
set_cached_acl(inode, type, acl);
- cond_clear_inode_flag(fi, FI_ACL_MODE);
+ clear_inode_flag(fi, FI_ACL_MODE);
return error;
}
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 0aef88f..d227dc6 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -1096,15 +1096,6 @@ static inline void set_acl_inode(struct f2fs_inode_info *fi, umode_t 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,
struct f2fs_inode *ri)
{
--
1.7.7
1.7.7