Skip to contentSkip to conversation

f2fs: remove unnecessary initialization

PATCH In review Sheng Yong 2 participants 2 messages Aug 23, 2016 – Aug 25, 2016 F2FS file system

lore
Share & tools
lore

Sheng Yong

author
#0 lore raw

PATCH 1/1 f2fs: remove unnecessary initialization

`flags' is used to save value from userspace, there is no need to initialize it, and FS_FL_USER_VISIBLE is the mask for getflags.

---
 fs/f2fs/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/file.c +1 -1
index 47abb96..7c6ee7e 100644
@@ -1454,7 +1454,7 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
 {
 	struct inode *inode = file_inode(filp);
 	struct f2fs_inode_info *fi = F2FS_I(inode);
-	unsigned int flags = fi->i_flags & FS_FL_USER_VISIBLE;
+	unsigned int flags;
 	unsigned int oldflags;
 	int ret;
 
Signature · 4 lines
2.9.2


------------------------------------------------------------------------------
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Sheng Yong

`flags' is used to save value from userspace, there is no need to initialize it, and FS_FL_USER_VISIBLE is the mask for getflags.

------------------------------------------------------------------------------