diff mbox

[V9fs-developer] 9P: fix return value in v9fs_fid_xattr_set

Message ID 1400659332-21498-1-git-send-email-dominique.martinet@cea.fr (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Dominique Martinet May 21, 2014, 8:02 a.m. UTC
v9fs_fid_xattr_set is supposed to return 0 on success.

This corrects the behaviour introduced in commit
bdd5c28dcb8330b9074404cc92a0b83aae5606a
"9p: fix return value in case in v9fs_fid_xattr_set()"

(The function returns a negative error on error, as expected)

Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
---
 fs/9p/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alin Dobre May 21, 2014, 1:14 p.m. UTC | #1
On 21/05/14 09:02, Dominique Martinet wrote:
> v9fs_fid_xattr_set is supposed to return 0 on success.
> 
> This corrects the behaviour introduced in commit
> bdd5c28dcb8330b9074404cc92a0b83aae5606a
> "9p: fix return value in case in v9fs_fid_xattr_set()"
> 
> (The function returns a negative error on error, as expected)
> 
> Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
> ---
>  fs/9p/xattr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
> index 04133a1..f95e01e 100644
> --- a/fs/9p/xattr.c
> +++ b/fs/9p/xattr.c
> @@ -156,7 +156,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
>  		offset += write_count;
>  		value_len -= write_count;
>  	}
> -	retval = offset;
> +	retval = 0;
>  err:
>  	p9_client_clunk(fid);
>  	return retval;
> 

This patch seems to be fixing the problem, thanks!

------------------------------------------------------------------------------
"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
Eric Van Hensbergen May 21, 2014, 1:49 p.m. UTC | #2
Okay, I'll try to pull this into mainline shortly.  Sorry I've been
unresponsive, its been a combination of being ill and other workload.

    -eric



On Wed, May 21, 2014 at 8:14 AM, Alin Dobre <alin.dobre@elastichosts.com>wrote:

> On 21/05/14 09:02, Dominique Martinet wrote:
> > v9fs_fid_xattr_set is supposed to return 0 on success.
> >
> > This corrects the behaviour introduced in commit
> > bdd5c28dcb8330b9074404cc92a0b83aae5606a
> > "9p: fix return value in case in v9fs_fid_xattr_set()"
> >
> > (The function returns a negative error on error, as expected)
> >
> > Signed-off-by: Dominique Martinet <dominique.martinet@cea.fr>
> > ---
> >  fs/9p/xattr.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
> > index 04133a1..f95e01e 100644
> > --- a/fs/9p/xattr.c
> > +++ b/fs/9p/xattr.c
> > @@ -156,7 +156,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const
> char *name,
> >               offset += write_count;
> >               value_len -= write_count;
> >       }
> > -     retval = offset;
> > +     retval = 0;
> >  err:
> >       p9_client_clunk(fid);
> >       return retval;
> >
>
> This patch seems to be fixing the problem, thanks!
>
------------------------------------------------------------------------------
"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
diff mbox

Patch

diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c
index 04133a1..f95e01e 100644
--- a/fs/9p/xattr.c
+++ b/fs/9p/xattr.c
@@ -156,7 +156,7 @@  int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
 		offset += write_count;
 		value_len -= write_count;
 	}
-	retval = offset;
+	retval = 0;
 err:
 	p9_client_clunk(fid);
 	return retval;