diff options
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/vfs_inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 2cb87ba4b1c1..5c6bdf82146c 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -530,9 +530,6 @@ error: | |||
530 | if (vfid) | 530 | if (vfid) |
531 | v9fs_fid_destroy(vfid); | 531 | v9fs_fid_destroy(vfid); |
532 | 532 | ||
533 | if (inode) | ||
534 | iput(inode); | ||
535 | |||
536 | return err; | 533 | return err; |
537 | } | 534 | } |
538 | 535 | ||
@@ -1054,6 +1051,9 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer, | |||
1054 | int ret; | 1051 | int ret; |
1055 | char *link = __getname(); | 1052 | char *link = __getname(); |
1056 | 1053 | ||
1054 | if (unlikely(!link)) | ||
1055 | return -ENOMEM; | ||
1056 | |||
1057 | if (buflen > PATH_MAX) | 1057 | if (buflen > PATH_MAX) |
1058 | buflen = PATH_MAX; | 1058 | buflen = PATH_MAX; |
1059 | 1059 | ||
@@ -1171,9 +1171,6 @@ error: | |||
1171 | if (vfid) | 1171 | if (vfid) |
1172 | v9fs_fid_destroy(vfid); | 1172 | v9fs_fid_destroy(vfid); |
1173 | 1173 | ||
1174 | if (inode) | ||
1175 | iput(inode); | ||
1176 | |||
1177 | return err; | 1174 | return err; |
1178 | 1175 | ||
1179 | } | 1176 | } |
@@ -1227,6 +1224,9 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir, | |||
1227 | } | 1224 | } |
1228 | 1225 | ||
1229 | name = __getname(); | 1226 | name = __getname(); |
1227 | if (unlikely(!name)) | ||
1228 | return -ENOMEM; | ||
1229 | |||
1230 | sprintf(name, "%d\n", oldfid->fid); | 1230 | sprintf(name, "%d\n", oldfid->fid); |
1231 | retval = v9fs_vfs_mkspecial(dir, dentry, V9FS_DMLINK, name); | 1231 | retval = v9fs_vfs_mkspecial(dir, dentry, V9FS_DMLINK, name); |
1232 | __putname(name); | 1232 | __putname(name); |