diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 23:38:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-07 23:38:21 +0200 |
commit | 3c5dff7b5ec7ac1bf356d43ac37e2e4ec7ec063a (patch) | |
tree | 1d6be67bfc1175333279da5934805be3921182b0 | |
parent | Merge branch 'for-linus' of git://neil.brown.name/md (diff) | |
parent | 9p: potential ERR_PTR() dereference (diff) | |
download | linux-3c5dff7b5ec7ac1bf356d43ac37e2e4ec7ec063a.tar.xz linux-3c5dff7b5ec7ac1bf356d43ac37e2e4ec7ec063a.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: potential ERR_PTR() dereference
-rw-r--r-- | fs/9p/fid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 358563689064..6406f896bf95 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) } kfree(wnames); fid_out: - v9fs_fid_add(dentry, fid); + if (!IS_ERR(fid)) + v9fs_fid_add(dentry, fid); err_out: up_read(&v9ses->rename_sem); return fid; |