All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] f2fs: avoid uneeded check of xattr name
       [not found] <1399174618-2382-1-git-send-email-zhenzhang.zhang@huawei.com>
@ 2014-05-04  8:13 ` Zhang Zhen
  0 siblings, 0 replies; only message in thread
From: Zhang Zhen @ 2014-05-04  8:13 UTC (permalink / raw)
  To: jaegeuk.kim; +Cc: linux-f2fs-devel

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

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 fs/f2fs/xattr.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
index 503c245..f382e24 100644
--- a/fs/f2fs/xattr.c
+++ b/fs/f2fs/xattr.c
@@ -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;

-- 
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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-05-04  8:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1399174618-2382-1-git-send-email-zhenzhang.zhang@huawei.com>
2014-05-04  8:13 ` [PATCH] f2fs: avoid uneeded check of xattr name Zhang Zhen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.