From ce8866f0913ff157edc098f06bad07763ad317e7 Mon Sep 17 00:00:00 2001 From: Scott Mayhew Date: Tue, 10 Dec 2019 07:31:15 -0500 Subject: NFS: Attach supplementary error information to fs_context. Split out from commit "NFS: Add fs_context support." Add wrappers nfs_errorf(), nfs_invalf(), and nfs_warnf() which log error information to the fs_context. Convert some printk's to use these new wrappers instead. Signed-off-by: Scott Mayhew Signed-off-by: Anna Schumaker --- fs/nfs/nfs4super.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/nfs/nfs4super.c') diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c index 7d5ed37633d8..1475f932d7da 100644 --- a/fs/nfs/nfs4super.c +++ b/fs/nfs/nfs4super.c @@ -225,6 +225,7 @@ int nfs4_try_get_tree(struct fs_context *fc) fc, ctx->nfs_server.hostname, ctx->nfs_server.export_path); if (err) { + nfs_errorf(fc, "NFS4: Couldn't follow remote path"); dfprintk(MOUNT, "<-- nfs4_try_get_tree() = %d [error]\n", err); } else { dfprintk(MOUNT, "<-- nfs4_try_get_tree() = 0\n"); @@ -247,6 +248,7 @@ int nfs4_get_referral_tree(struct fs_context *fc) fc, ctx->nfs_server.hostname, ctx->nfs_server.export_path); if (err) { + nfs_errorf(fc, "NFS4: Couldn't follow remote path"); dfprintk(MOUNT, "<-- nfs4_get_referral_tree() = %d [error]\n", err); } else { dfprintk(MOUNT, "<-- nfs4_get_referral_tree() = 0\n"); -- cgit v1.2.3-59-g8ed1b