]> asedeno.scripts.mit.edu Git - linux.git/commit
quota: honor quota type in Q_XGETQSTAT[V] calls
authorEric Sandeen <sandeen@redhat.com>
Fri, 21 Jun 2019 23:27:13 +0000 (18:27 -0500)
committerJan Kara <jack@suse.cz>
Tue, 25 Jun 2019 15:51:35 +0000 (17:51 +0200)
commit555b2c3da1fc3d1c5cc133e9353354c40fbfe336
tree0604367ea667b9a32c8070e1174920c3ae0d5d29
parent936bbf3aea84696ce1081ab9648d08bbf08ca7aa
quota: honor quota type in Q_XGETQSTAT[V] calls

The code in quota_getstate and quota_getstatev is strange; it
says the returned fs_quota_stat[v] structure has room for only
one type of time limits, so fills it in with the first enabled
quota, even though every quotactl command must have a type sent
in by the user.

Instead of just picking the first enabled quota, fill in the
reply with the timers for the quota type that was actually
requested.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/quota/quota.c