Skip to content

Commit

Permalink
quota: Drop path reference on error exit from quotactl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jan Kara committed Oct 31, 2011
1 parent a983f36 commit 0aaa618
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/quota/quota.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0aaa618

Please sign in to comment.