diff mbox

[3/5] ceph: fix ceph_removexattr()

Message ID 1392096612-11481-3-git-send-email-zheng.z.yan@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Yan, Zheng Feb. 11, 2014, 5:30 a.m. UTC
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
---
 fs/ceph/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Elder Feb. 11, 2014, 2:50 p.m. UTC | #1
On 02/10/2014 11:30 PM, Yan, Zheng wrote:
> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>

You need a better explanation than "fix."

We have the ENODATA thing (versus ENOATTR), but again
what you have is fine.

> ---
>  fs/ceph/xattr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
> index 6ed0e5a..79f9c12 100644
> --- a/fs/ceph/xattr.c
> +++ b/fs/ceph/xattr.c
> @@ -463,7 +463,7 @@ static int __remove_xattr(struct ceph_inode_info *ci,
>  			  struct ceph_inode_xattr *xattr)
>  {
>  	if (!xattr)
> -		return -EOPNOTSUPP;
> +		return -ENODATA;

It seems like this could be a void function, and the (one) caller
could check for null before making the call.

Either way though, this looks good.

Reviewed-by: Alex Elder <elder@linaro.org>


>  
>  	rb_erase(&xattr->node, &ci->i_xattrs.index);
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 6ed0e5a..79f9c12 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -463,7 +463,7 @@  static int __remove_xattr(struct ceph_inode_info *ci,
 			  struct ceph_inode_xattr *xattr)
 {
 	if (!xattr)
-		return -EOPNOTSUPP;
+		return -ENODATA;
 
 	rb_erase(&xattr->node, &ci->i_xattrs.index);