Commit 963649d7 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus-3.16-merge-window' of...

Merge tag 'for-linus-3.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs

Pull 9p fixes from Eric Van Hensbergen:
 "Two bug fixes, one in xattr error path and the other in parsing
  major/minor numbers from devices"

* tag 'for-linus-3.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
  9P: fix return value in v9fs_fid_xattr_set
  fs/9p: adjust sscanf parameters accordingly to the variable types
parents 1662867a f15844e0
...@@ -147,7 +147,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses, ...@@ -147,7 +147,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses,
int major = -1, minor = -1; int major = -1, minor = -1;
strlcpy(ext, stat->extension, sizeof(ext)); strlcpy(ext, stat->extension, sizeof(ext));
sscanf(ext, "%c %u %u", &type, &major, &minor); sscanf(ext, "%c %i %i", &type, &major, &minor);
switch (type) { switch (type) {
case 'c': case 'c':
res |= S_IFCHR; res |= S_IFCHR;
......
...@@ -156,7 +156,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name, ...@@ -156,7 +156,7 @@ int v9fs_fid_xattr_set(struct p9_fid *fid, const char *name,
offset += write_count; offset += write_count;
value_len -= write_count; value_len -= write_count;
} }
retval = offset; retval = 0;
err: err:
p9_client_clunk(fid); p9_client_clunk(fid);
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment