The patch titled exportfs: handle NULL returns from fh_to_dentry()/fh_to_parent() has been removed from the -mm tree. Its filename was exportfs-handle-null-returns-from-fh_to_dentry-fh_to_parent.patch This patch was dropped because it was merged into mainline or a subsystem tree The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: exportfs: handle NULL returns from fh_to_dentry()/fh_to_parent() From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx> While 440037287c5 "[PATCH] switch all filesystems over to d_obtain_alias" removed some cases where fh_to_dentry() and fh_to_parent() could return NULL, there are still a few NULL returns left in individual filesystems. Thus it was a mistake for that commit to remove the handling of NULL returns in the callers. Revert those parts of 440037287c5 which removed the NULL handling. (We could, alternatively, modify all implementations to return -ESTALE instead of NULL, but that proves to require fixing a number of filesystems, and in some cases it's arguably more natural to return NULL.) Thanks to David for original patch and Linus, Christoph, and Hugh for review. Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Cc: Neil Brown <neilb@xxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/exportfs/expfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN fs/exportfs/expfs.c~exportfs-handle-null-returns-from-fh_to_dentry-fh_to_parent fs/exportfs/expfs.c --- a/fs/exportfs/expfs.c~exportfs-handle-null-returns-from-fh_to_dentry-fh_to_parent +++ a/fs/exportfs/expfs.c @@ -369,6 +369,8 @@ struct dentry *exportfs_decode_fh(struct * 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; @@ -422,6 +424,8 @@ struct dentry *exportfs_decode_fh(struct 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; _ Patches currently in -mm which might be from bfields@xxxxxxxxxxxxxx are origin.patch linux-next.patch reiser4.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html