From: Charles Hannum Date: Fri, 22 Oct 2010 18:50:56 +0000 (-0400) Subject: linux fh_to_dentry can return err X-Git-Tag: upstream/1.8.0_pre1^2~4635 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=046f230ed4dde4c31d849893eec750437135342e;p=packages%2Fo%2Fopenafs.git linux fh_to_dentry can return err handle e.g. ESTALE from fh_to_dentry (in this case via d_obtain_alias and fat_fh_to_dentry) so we print a meaningful error when we lose. Change-Id: If9f53776e0df4bfecf704943110a62b8c98684ce Reviewed-on: http://gerrit.openafs.org/3028 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c index 2602ec637..4a28da6d2 100644 --- a/src/afs/LINUX/osi_file.c +++ b/src/afs/LINUX/osi_file.c @@ -50,7 +50,7 @@ afs_linux_raw_open(afs_dcache_id_t *ainode) dp = afs_get_dentry_from_fh(afs_cacheSBp, ainode, cache_fh_len, cache_fh_type, afs_fh_acceptable); - if (!dp) + if ((!dp) || IS_ERR(dp)) osi_Panic("Can't get dentry\n"); tip = dp->d_inode; tip->i_flags |= S_NOATIME; /* Disable updating access times. */