Skip to contentSkip to conversation

f2fs: avoid uneeded check of xattr name

PATCH New Zhang Zhen 1 participant 1 message May 4, 2014 1 message not in the archive F2FS file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Zhang Zhen

author
#1 lore raw

PATCH 1/1 f2fs: avoid uneeded check of xattr name

In all the callers of f2fs_set(get)xattr(),
the xattr name can not be NULL.

---
 fs/f2fs/xattr.c | 5 -----
 1 file changed, 5 deletions(-)
fs/f2fs/xattr.c +0 -5
index 503c245..f382e24 100644
@@ -404,8 +404,6 @@ int f2fs_getxattr(struct inode *inode, int name_index, const char *name,
 	int error = 0;
 	size_t value_len, name_len;
 
-	if (name == NULL)
-		return -EINVAL;
 	name_len = strlen(name);
 	if (name_len > F2FS_NAME_LEN)
 		return -ERANGE;
@@ -487,9 +485,6 @@ static int __f2fs_setxattr(struct inode *inode, int name_index,
 	__u32 new_hsize;
 	int error = -ENOMEM;
 
-	if (name == NULL)
-		return -EINVAL;
-
 	if (value == NULL)
 		value_len = 0;
 
Signature · 15 lines
1.8.1.2


.





------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs