diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-08 17:35:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-08 17:35:19 -0400 |
commit | 963649d735c8b6eb0f97e82c54f02426ff3f1f45 (patch) | |
tree | ba718c456efbcf7a9564a60db1b8bebb961e7889 /fs/9p | |
parent | 1662867a9b2574bfdb9d4e97186aa131218d7210 (diff) | |
parent | f15844e0777fec936f87a87f97394f83911dacd3 (diff) |
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
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_inode.c | 2 | ||||
-rw-r--r-- | fs/9p/xattr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 00d140fb2263..7fa4f7a7653d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -147,7 +147,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses, | |||
147 | int major = -1, minor = -1; | 147 | int major = -1, minor = -1; |
148 | 148 | ||
149 | strlcpy(ext, stat->extension, sizeof(ext)); | 149 | strlcpy(ext, stat->extension, sizeof(ext)); |
150 | sscanf(ext, "%c %u %u", &type, &major, &minor); | 150 | sscanf(ext, "%c %i %i", &type, &major, &minor); |
151 | switch (type) { | 151 | switch (type) { |
152 | case 'c': | 152 | case 'c': |
153 | res |= S_IFCHR; | 153 | res |= S_IFCHR; |
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index 04133a1fd9cb..f95e01e058e4 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, | |||
156 | offset += write_count; | 156 | offset += write_count; |
157 | value_len -= write_count; | 157 | value_len -= write_count; |
158 | } | 158 | } |
159 | retval = offset; | 159 | retval = 0; |
160 | err: | 160 | err: |
161 | p9_client_clunk(fid); | 161 | p9_client_clunk(fid); |
162 | return retval; | 162 | return retval; |