From c044b5f19b6bae249506f00abb89d18599563a03 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 8 Dec 2008 19:50:09 -0800 Subject: [PATCH] --- yaml --- r: 119740 b: refs/heads/master c: 7f336bf1e59a0d49ffc178a5747ed7da25c6a6a3 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/exportfs/expfs.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 95e75fafed3a..980ea80eddac 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 53846574799884a04a4498f6342400d5c1423c79 +refs/heads/master: 7f336bf1e59a0d49ffc178a5747ed7da25c6a6a3 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;