Skip to content

Commit 73e70ed

Browse files
committed
gfs2: Clean up quota.c:print_message
jira LE-1907 Rebuild_History Non-Buildable kernel-4.18.0-553.16.1.el8_10 commit-author Andreas Gruenbacher <[email protected]> commit 1f7b0a8 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 <[email protected]> (cherry picked from commit 1f7b0a8) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 28c0914 commit 73e70ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fs/gfs2/quota.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1184,17 +1184,16 @@ void gfs2_quota_unlock(struct gfs2_inode *ip)
11841184

11851185
#define MAX_LINE 256
11861186

1187-
static int print_message(struct gfs2_quota_data *qd, char *type)
1187+
static void print_message(struct gfs2_quota_data *qd, char *type)
11881188
{
11891189
struct gfs2_sbd *sdp = qd->qd_gl->gl_name.ln_sbd;
11901190

1191-
if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
1191+
if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET) {
11921192
fs_info(sdp, "quota %s for %s %u\n",
11931193
type,
11941194
(qd->qd_id.type == USRQUOTA) ? "user" : "group",
11951195
from_kqid(&init_user_ns, qd->qd_id));
1196-
1197-
return 0;
1196+
}
11981197
}
11991198

12001199
/**
@@ -1264,7 +1263,8 @@ int gfs2_quota_check(struct gfs2_inode *ip, kuid_t uid, kgid_t gid,
12641263
* HZ)) {
12651264
quota_send_warning(qd->qd_id,
12661265
sdp->sd_vfs->s_dev, QUOTA_NL_BSOFTWARN);
1267-
error = print_message(qd, "warning");
1266+
print_message(qd, "warning");
1267+
error = 0;
12681268
qd->qd_last_warn = jiffies;
12691269
}
12701270
}

0 commit comments

Comments
 (0)