diff options
author | Brian Behlendorf <[email protected]> | 2012-12-03 12:01:28 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-12-03 12:06:25 -0800 |
commit | 053678f3b0572db442551dfa547dea939f45c96b (patch) | |
tree | c7ef270c66d7b180f38dee8adc9970d1737402cb /module/spl/spl-vnode.c | |
parent | b84412a6e8a1d22780a8203e00049c6e43efacac (diff) |
Handle errors from spl_kern_path_locked()
When the Linux 3.6 KERN_PATH_LOCKED compatibility code was added
by commit bcb1589 an entirely new vn_remove() implementation was
added. That function did not properly handle an error from
spl_kern_path_locked() which would result in an panic. This
patch addresses the issue by returning the error to the caller.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #187
Diffstat (limited to 'module/spl/spl-vnode.c')
-rw-r--r-- | module/spl/spl-vnode.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index a0fed3201..0ecd9addf 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -332,6 +332,8 @@ vn_remove(const char *path, uio_seg_t seg, int flags) rc = vfs_unlink(parent.dentry->d_inode, dentry); exit1: dput(dentry); + } else { + return (-rc); } spl_inode_unlock(parent.dentry->d_inode); |