From 1aca86e2b942235b059782902cda4a1b5ea76514 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Mon, 8 Dec 2008 18:24:18 -0500 Subject: [PATCH] --- yaml --- r: 119737 b: refs/heads/master c: a4f4d6df537368297a84e6b9444f403f99bf59f6 h: refs/heads/master i: 119735: 720bcfeb58ff206b09c2bdcd1c56626a9b5412b6 v: v3 --- [refs] | 2 +- trunk/fs/exportfs/expfs.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 412fd7df66bc..a40ea40f388b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 218d11a8b071b23b76c484fd5f72a4fe3306801e +refs/heads/master: a4f4d6df537368297a84e6b9444f403f99bf59f6 diff --git a/trunk/fs/exportfs/expfs.c b/trunk/fs/exportfs/expfs.c index 80246bad1b7f..890e01828817 100644 --- a/trunk/fs/exportfs/expfs.c +++ b/trunk/fs/exportfs/expfs.c @@ -367,6 +367,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, * Try to get any dentry for the given file handle from the filesystem. */ result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type); + if (!result) + result = ERR_PTR(-ESTALE); if (IS_ERR(result)) return result; @@ -420,6 +422,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, target_dir = nop->fh_to_parent(mnt->mnt_sb, fid, fh_len, fileid_type); + if (!target_dir) + goto err_result; err = PTR_ERR(target_dir); if (IS_ERR(target_dir)) goto err_result;