All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhang Zhen <zhenzhang.zhang@huawei.com>
To: jaegeuk.kim@samsung.com
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [PATCH] f2fs: avoid uneeded check of xattr name
Date: Sun, 4 May 2014 16:13:08 +0800	[thread overview]
Message-ID: <5365F694.1050304@huawei.com> (raw)
In-Reply-To: <1399174618-2382-1-git-send-email-zhenzhang.zhang@huawei.com>

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

           reply	other threads:[~2014-05-04  8:13 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1399174618-2382-1-git-send-email-zhenzhang.zhang@huawei.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5365F694.1050304@huawei.com \
    --to=zhenzhang.zhang@huawei.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.