mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
gfs2: Two quota=account mode fixes
Make sure we don't skip accounting for quota changes with the quota=account mount option. Reviewed-by: Bob Peterson <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
This commit is contained in:
1 parent
1358706907
commit
703df114f9
2 files changed
+3
-6
No files matched your search
+2
-4
@@ -1083,8 +1083,7 @@ int gfs2_quota_lock(struct gfs2_inode *ip, kuid_t uid, kgid_t gid)
|
||||
u32 x;
|
||||
int error;
|
||||
|
||||
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON &&
|
||||
sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
|
||||
if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF)
|
||||
return 0;
|
||||
|
||||
error = gfs2_quota_hold(ip, uid, gid);
|
||||
@@ -1285,8 +1284,7 @@ void gfs2_quota_change(struct gfs2_inode *ip, s64 change,
|
||||
u32 x;
|
||||
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
|
||||
|
||||
if ((sdp->sd_args.ar_quota != GFS2_QUOTA_ON &&
|
||||
sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET) ||
|
||||
if (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ||
|
||||
gfs2_assert_warn(sdp, change))
|
||||
return;
|
||||
if (ip->i_diskflags & GFS2_DIF_SYSTEM)
|
||||
|
||||
+1
-2
@@ -50,8 +50,7 @@ static inline int gfs2_quota_lock_check(struct gfs2_inode *ip,
|
||||
ret = gfs2_quota_lock(ip, NO_UID_QUOTA_CHANGE, NO_GID_QUOTA_CHANGE);
|
||||
if (ret)
|
||||
return ret;
|
||||
if (sdp->sd_args.ar_quota != GFS2_QUOTA_ON &&
|
||||
sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
|
||||
if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
|
||||
return 0;
|
||||
ret = gfs2_quota_check(ip, ip->i_inode.i_uid, ip->i_inode.i_gid, ap);
|
||||
if (ret)
|
||||
|
||||
Reference in new issue
Block a user