提交 0aaa6188 编写于 作者: J Jan Kara

quota: Drop path reference on error exit from quotactl

One error exit from quotactl forgot to do path_put(). Fix that.
Reported-by: NValerie Aurora <val@vaaconsulting.com>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 a983f368
...@@ -363,12 +363,15 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special, ...@@ -363,12 +363,15 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
} }
sb = quotactl_block(special); sb = quotactl_block(special);
if (IS_ERR(sb)) if (IS_ERR(sb)) {
return PTR_ERR(sb); ret = PTR_ERR(sb);
goto out;
}
ret = do_quotactl(sb, type, cmds, id, addr, pathp); ret = do_quotactl(sb, type, cmds, id, addr, pathp);
drop_super(sb); drop_super(sb);
out:
if (pathp && !IS_ERR(pathp)) if (pathp && !IS_ERR(pathp))
path_put(pathp); path_put(pathp);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册