summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2011-09-19 10:25:49 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2011-10-21 12:39:51 +0100
commit891a8e9335176b7eb9adc5e34f555ee5e1da47c6 (patch)
tree61e52cad86ab0455f310478189f21722a785c16d /fs/gfs2/quota.c
parent64dd153c83743af81f20924c6343652d731eeecb (diff)
downloadtalos-op-linux-891a8e9335176b7eb9adc5e34f555ee5e1da47c6.tar.gz
talos-op-linux-891a8e9335176b7eb9adc5e34f555ee5e1da47c6.zip
GFS2: Misc fixes
Some items picked up through automated code analysis. A few bits of unreachable code and two unchecked return values. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
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,
int err, nbytes;
u64 size;
- if (gfs2_is_stuffed(ip))
- gfs2_unstuff_dinode(ip, NULL);
+ if (gfs2_is_stuffed(ip)) {
+ err = gfs2_unstuff_dinode(ip, NULL);
+ if (err)
+ return err;
+ }
memset(&q, 0, sizeof(struct gfs2_quota));
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)
unsigned int x;
int error = 0;
- gfs2_quota_hold(ip, uid, gid);
+ error = gfs2_quota_hold(ip, uid, gid);
+ if (error)
+ return error;
if (capable(CAP_SYS_RESOURCE) ||
sdp->sd_args.ar_quota != GFS2_QUOTA_ON)
OpenPOWER on IntegriCloud