aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 10a59cd21f0c..7e528dc14f85 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -645,8 +645,11 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
645 int err, nbytes; 645 int err, nbytes;
646 u64 size; 646 u64 size;
647 647
648 if (gfs2_is_stuffed(ip)) 648 if (gfs2_is_stuffed(ip)) {
649 gfs2_unstuff_dinode(ip, NULL); 649 err = gfs2_unstuff_dinode(ip, NULL);
650 if (err)
651 return err;
652 }
650 653
651 memset(&q, 0, sizeof(struct gfs2_quota)); 654 memset(&q, 0, sizeof(struct gfs2_quota));
652 err = gfs2_internal_read(ip, NULL, (char *)&q, &loc, sizeof(q)); 655 err = gfs2_internal_read(ip, NULL, (char *)&q, &loc, sizeof(q));
@@ -927,7 +930,9 @@ int gfs2_quota_lock(struct gfs2_inode *ip, u32 uid, u32 gid)
927 unsigned int x; 930 unsigned int x;
928 int error = 0; 931 int error = 0;
929 932
930 gfs2_quota_hold(ip, uid, gid); 933 error = gfs2_quota_hold(ip, uid, gid);
934 if (error)
935 return error;
931 936
932 if (capable(CAP_SYS_RESOURCE) || 937 if (capable(CAP_SYS_RESOURCE) ||
933 sdp->sd_args.ar_quota != GFS2_QUOTA_ON) 938 sdp->sd_args.ar_quota != GFS2_QUOTA_ON)