summaryrefslogtreecommitdiffstats
path: root/fs/quota
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-10-10 18:32:06 +0200
committerJan Kara <jack@suse.cz>2011-10-31 23:43:59 +0100
commit0aaa618863c40e86b543debe002d6f65ff5d61d4 (patch)
tree89b1d65cf43d58a4800e2ba1129e61cdcb5bbdfb /fs/quota
parenta983f368f8986c1ecb64f2947fcf594343130215 (diff)
downloadop-kernel-dev-0aaa618863c40e86b543debe002d6f65ff5d61d4.zip
op-kernel-dev-0aaa618863c40e86b543debe002d6f65ff5d61d4.tar.gz
quota: Drop path reference on error exit from quotactl
One error exit from quotactl forgot to do path_put(). Fix that. Reported-by: Valerie Aurora <val@vaaconsulting.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/quota')
-rw-r--r--fs/quota/quota.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/quota/quota.c b/fs/quota/quota.c
index b34bdb2..a18ef46 100644
--- a/fs/quota/quota.c
+++ b/fs/quota/quota.c
@@ -363,12 +363,15 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
}
sb = quotactl_block(special);
- if (IS_ERR(sb))
- return PTR_ERR(sb);
+ if (IS_ERR(sb)) {
+ ret = PTR_ERR(sb);
+ goto out;
+ }
ret = do_quotactl(sb, type, cmds, id, addr, pathp);
drop_super(sb);
+out:
if (pathp && !IS_ERR(pathp))
path_put(pathp);
return ret;
OpenPOWER on IntegriCloud