Skip to content

Commit 8382e26

Browse files
JoePerchesswhiteho
authored andcommitted
GFS2: Use fs_<level> more often
Convert a couple of uses of pr_<level> to fs_<level> Add and use fs_emerg. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent d77d1b5 commit 8382e26

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

‎fs/gfs2/quota.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,8 +1083,8 @@ static int print_message(struct gfs2_quota_data *qd, char *type)
10831083
{
10841084
struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd;
10851085

1086-
pr_info("fsid=%s: quota %s for %s %u\n",
1087-
sdp->sd_fsname, type,
1086+
fs_info(sdp, "quota %s for %s %u\n",
1087+
type,
10881088
(qd->qd_id.type == USRQUOTA) ? "user" : "group",
10891089
from_kqid(&init_user_ns, qd->qd_id));
10901090

‎fs/gfs2/util.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ mempool_t *gfs2_page_pool __read_mostly;
3232

3333
void gfs2_assert_i(struct gfs2_sbd *sdp)
3434
{
35-
pr_emerg("fsid=%s: fatal assertion failed\n", sdp->sd_fsname);
35+
fs_emerg(sdp, "fatal assertion failed\n");
3636
}
3737

3838
int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
@@ -106,8 +106,8 @@ int gfs2_assert_warn_i(struct gfs2_sbd *sdp, char *assertion,
106106
return -2;
107107

108108
if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW)
109-
pr_warn("fsid=%s: warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n",
110-
sdp->sd_fsname, assertion, function, file, line);
109+
fs_warn(sdp, "warning: assertion \"%s\" failed at function = %s, file = %s, line = %u\n",
110+
assertion, function, file, line);
111111

112112
if (sdp->sd_args.ar_debug)
113113
BUG();

‎fs/gfs2/util.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include "incore.h"
2121

22+
#define fs_emerg(fs, fmt, ...) \
23+
pr_emerg("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
2224
#define fs_warn(fs, fmt, ...) \
2325
pr_warn("fsid=%s: " fmt, (fs)->sd_fsname, ##__VA_ARGS__)
2426
#define fs_err(fs, fmt, ...) \

0 commit comments

Comments
 (0)