diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-09-15 17:20:30 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-12-03 12:50:03 +0100 |
commit | ea7623385930c63e2a35749cff9db72094cd06ad (patch) | |
tree | 7ece734b87ee3e344283e35035f62deca0cadd1d /fs/gfs2/sys.c | |
parent | GFS2: Add get_xstate quota function (diff) | |
download | linux-ea7623385930c63e2a35749cff9db72094cd06ad.tar.xz linux-ea7623385930c63e2a35749cff9db72094cd06ad.zip |
GFS2: Add proper error reporting to quota sync via sysfs
For some reason, the errors were not making it to userspace.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r-- | fs/gfs2/sys.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index be1b8aca5906..c5dad1eb7b91 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -178,6 +178,7 @@ static ssize_t quota_sync_store(struct gfs2_sbd *sdp, const char *buf, static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { + int error; u32 id; if (!capable(CAP_SYS_ADMIN)) @@ -185,13 +186,14 @@ static ssize_t quota_refresh_user_store(struct gfs2_sbd *sdp, const char *buf, id = simple_strtoul(buf, NULL, 0); - gfs2_quota_refresh(sdp, 1, id); - return len; + error = gfs2_quota_refresh(sdp, 1, id); + return error ? error : len; } static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, size_t len) { + int error; u32 id; if (!capable(CAP_SYS_ADMIN)) @@ -199,8 +201,8 @@ static ssize_t quota_refresh_group_store(struct gfs2_sbd *sdp, const char *buf, id = simple_strtoul(buf, NULL, 0); - gfs2_quota_refresh(sdp, 0, id); - return len; + error = gfs2_quota_refresh(sdp, 0, id); + return error ? error : len; } static ssize_t demote_rq_store(struct gfs2_sbd *sdp, const char *buf, size_t len) |