diff options
author | Carlos Maiolino <cem@kernel.org> | 2024-01-26 19:02:10 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2024-01-29 11:59:49 +0100 |
commit | ded570b1fffbeaefbecb6c191f0b5168f3b8ad0d (patch) | |
tree | d28a6006fd798d28a93dd8b511df392876d2c226 /quotasync.c | |
parent | c18e5a1b1e51c0382f5d1431120fe65f7e9c982c (diff) |
Add quotactl_fd() support
To be able to set quotas on filesystems without a backing device, quota tools
should be able to use quotactl_fd().
To achieve that, add a new helper, do_quotactl(), to select between quotactl()
and quotactl_fd().
This shouldn't change the semantics of current code. quotactl_fd() will be
called if and only if the handlers contain an empty device, and a valid
mountpoint.
All current calls containing a value device should be still handled by quotactl().
The same is true for calls passing a NULL device on purpose, aiming to sync
active quotas.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'quotasync.c')
-rw-r--r-- | quotasync.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/quotasync.c b/quotasync.c index 80f7e9e..cad2a20 100644 --- a/quotasync.c +++ b/quotasync.c @@ -100,7 +100,7 @@ static int sync_one(int type, char *dev) { int qcmd = QCMD(Q_SYNC, type); - return quotactl(qcmd, dev, 0, NULL); + return do_quotactl(qcmd, dev, NULL, 0, NULL); } static int syncquotas(int type) |