Skip to content

Commit 1f7b0a8

Browse files
author
Andreas Gruenbacher
committed
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>
1 parent f7e4c61 commit 1f7b0a8

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

fs/gfs2/quota.c

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

11911191
#define MAX_LINE 256
11921192

1193-
static int print_message(struct gfs2_quota_data *qd, char *type)
1193+
static void print_message(struct gfs2_quota_data *qd, char *type)
11941194
{
11951195
struct gfs2_sbd *sdp = qd->qd_sbd;
11961196

1197-
if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET)
1197+
if (sdp->sd_args.ar_quota != GFS2_QUOTA_QUIET) {
11981198
fs_info(sdp, "quota %s for %s %u\n",
11991199
type,
12001200
(qd->qd_id.type == USRQUOTA) ? "user" : "group",
12011201
from_kqid(&init_user_ns, qd->qd_id));
1202-
1203-
return 0;
1202+
}
12041203
}
12051204

12061205
/**
@@ -1270,7 +1269,8 @@ int gfs2_quota_check(struct gfs2_inode *ip, kuid_t uid, kgid_t gid,
12701269
* HZ)) {
12711270
quota_send_warning(qd->qd_id,
12721271
sdp->sd_vfs->s_dev, QUOTA_NL_BSOFTWARN);
1273-
error = print_message(qd, "warning");
1272+
print_message(qd, "warning");
1273+
error = 0;
12741274
qd->qd_last_warn = jiffies;
12751275
}
12761276
}

0 commit comments

Comments
 (0)