diff options
author | Scott Mayhew <smayhew@redhat.com> | 2019-12-10 15:31:15 +0300 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2020-01-15 18:15:17 +0300 |
commit | ce8866f0913ff157edc098f06bad07763ad317e7 (patch) | |
tree | 58ff854f41cb7f7bd626a9d734f883c804488887 /fs/nfs/getroot.c | |
parent | 62a55d088cd87d480a6fd67b0d63b14ccae80838 (diff) | |
download | linux-ce8866f0913ff157edc098f06bad07763ad317e7.tar.xz |
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>
Diffstat (limited to 'fs/nfs/getroot.c')
-rw-r--r-- | fs/nfs/getroot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index ab45496d23a6..b012c2668a1f 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c @@ -86,6 +86,7 @@ int nfs_get_root(struct super_block *s, struct fs_context *fc) error = server->nfs_client->rpc_ops->getroot(server, ctx->mntfh, &fsinfo); if (error < 0) { dprintk("nfs_get_root: getattr error = %d\n", -error); + nfs_errorf(fc, "NFS: Couldn't getattr on root"); goto out_fattr; } @@ -93,6 +94,7 @@ int nfs_get_root(struct super_block *s, struct fs_context *fc) if (IS_ERR(inode)) { dprintk("nfs_get_root: get root inode failed\n"); error = PTR_ERR(inode); + nfs_errorf(fc, "NFS: Couldn't get root inode"); goto out_fattr; } @@ -108,6 +110,7 @@ int nfs_get_root(struct super_block *s, struct fs_context *fc) if (IS_ERR(root)) { dprintk("nfs_get_root: get root dentry failed\n"); error = PTR_ERR(root); + nfs_errorf(fc, "NFS: Couldn't get root dentry"); goto out_fattr; } |