|
@@ -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.
|
|
* 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);
|
|
result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
|
|
|
|
+ if (!result)
|
|
|
|
+ result = ERR_PTR(-ESTALE);
|
|
if (IS_ERR(result))
|
|
if (IS_ERR(result))
|
|
return 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,
|
|
target_dir = nop->fh_to_parent(mnt->mnt_sb, fid,
|
|
fh_len, fileid_type);
|
|
fh_len, fileid_type);
|
|
|
|
+ if (!target_dir)
|
|
|
|
+ goto err_result;
|
|
err = PTR_ERR(target_dir);
|
|
err = PTR_ERR(target_dir);
|
|
if (IS_ERR(target_dir))
|
|
if (IS_ERR(target_dir))
|
|
goto err_result;
|
|
goto err_result;
|