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 <smayhew@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Scott Mayhew
2019-12-10 07:31:15 -05:00
committed by Anna Schumaker
parent 62a55d088c
commit ce8866f091
6 changed files with 48 additions and 72 deletions

View File

@@ -1205,7 +1205,7 @@ int nfs_get_tree_common(struct fs_context *fc)
fc->s_fs_info = NULL;
if (IS_ERR(s)) {
error = PTR_ERR(s);
dfprintk(MOUNT, "NFS: Couldn't get superblock\n");
nfs_errorf(fc, "NFS: Couldn't get superblock");
goto out_err_nosb;
}
@@ -1234,7 +1234,7 @@ int nfs_get_tree_common(struct fs_context *fc)
error = nfs_get_root(s, fc);
if (error < 0) {
dfprintk(MOUNT, "NFS: Couldn't get root dentry\n");
nfs_errorf(fc, "NFS: Couldn't get root dentry");
goto error_splat_super;
}