summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2023-10-20 21:02:59 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2023-11-02 20:10:00 +0100
commit1f7b0a84c86eca74155dc292cd2f965d6bb79884 (patch)
tree7417b375df6049e6f143408fd354629fc34046a1
parentf7e4c610cb9afcb94d45c6252c312b95038d52bc (diff)
downloadlinux-stable-1f7b0a84c86eca74155dc292cd2f965d6bb79884.tar.gz
linux-stable-1f7b0a84c86eca74155dc292cd2f965d6bb79884.tar.bz2
linux-stable-1f7b0a84c86eca74155dc292cd2f965d6bb79884.zip
gfs2: Clean up quota.c:print_message
Function print_message() in quota.c doesn't return a meaningful return value. Turn it into a void function and stop abusing it for setting variable error to 0 in gfs2_quota_check(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
-rw-r--r--fs/gfs2/quota.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 27f14ef4d346..e72b5864a63a 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1190,17 +1190,16 @@ void gfs2_quota_unlock(struct gfs2_inode *ip)
#define MAX_LINE 256
-static int print_message(struct gfs2_quota_data *qd, char *type)
+static void print_message(struct gfs2_quota_data *qd, char *type)
{
struct gfs2_sbd *sdp = qd->qd_sbd;
- if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
+ if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET) {
fs_info(sdp, "quota %s for %s %u\n",
type,
(qd->qd_id.type == USRQUOTA) ? "user" : "group",
from_kqid(&init_user_ns, qd->qd_id));
-
- return 0;
+ }
}
/**
@@ -1270,7 +1269,8 @@ int gfs2_quota_check(struct gfs2_inode *ip, kuid_t uid, kgid_t gid,
* HZ)) {
quota_send_warning(qd->qd_id,
sdp->sd_vfs->s_dev, QUOTA_NL_BSOFTWARN);
- error = print_message(qd, "warning");
+ print_message(qd, "warning");
+ error = 0;
qd->qd_last_warn = jiffies;
}
}