* [PATCH] Ext4: fix project quota accounting without quota limits enabled.
@ 2016-07-05 6:58 Wang Shilong
2016-07-06 1:34 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Wang Shilong @ 2016-07-05 6:58 UTC (permalink / raw)
To: linux-ext4; +Cc: lixi, sihara, tytso, wshilong
From: Wang Shilong <wshilong@ddn.com>
Steps to reproduce:
#mkfs.ext4 /dev/sda4 -O quota,project
#mount /dev/sda4 /mnt/test
#touch /mnt/test/file
#chattr -p 123 /mnt/test/file
#quota -v -P 123
Problems is we should always transfer quota accounting whatver
quota limits enabled.
Signed-off-by: Wang Shilong <wshilong@ddn.com>
---
fs/ext4/ioctl.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 28cc412..b5a39b0 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -308,6 +308,7 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
kprojid_t kprojid;
struct ext4_iloc iloc;
struct ext4_inode *raw_inode;
+ struct dquot *transfer_to[MAXQUOTAS] = { };
if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
EXT4_FEATURE_RO_COMPAT_PROJECT)) {
@@ -361,17 +362,14 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
if (err)
goto out_stop;
- if (sb_has_quota_limits_enabled(sb, PRJQUOTA)) {
- struct dquot *transfer_to[MAXQUOTAS] = { };
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Ext4: fix project quota accounting without quota limits enabled.
2016-07-05 6:58 [PATCH] Ext4: fix project quota accounting without quota limits enabled Wang Shilong
@ 2016-07-06 1:34 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2016-07-06 1:34 UTC (permalink / raw)
To: Wang Shilong; +Cc: linux-ext4, lixi, sihara, wshilong
On Tue, Jul 05, 2016 at 03:58:10PM +0900, Wang Shilong wrote:
> From: Wang Shilong <wshilong@ddn.com>
>
> Steps to reproduce:
> #mkfs.ext4 /dev/sda4 -O quota,project
> #mount /dev/sda4 /mnt/test
> #touch /mnt/test/file
> #chattr -p 123 /mnt/test/file
> #quota -v -P 123
>
> Problems is we should always transfer quota accounting whatver
> quota limits enabled.
>
> Signed-off-by: Wang Shilong <wshilong@ddn.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-07-06 1:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-05 6:58 [PATCH] Ext4: fix project quota accounting without quota limits enabled Wang Shilong
2016-07-06 1:34 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).