aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/llite_nfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/lustre/lustre/llite/llite_nfs.c')
-rw-r--r--drivers/staging/lustre/lustre/llite/llite_nfs.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c
index 709230571b4b..49a930f0fc5d 100644
--- a/drivers/staging/lustre/lustre/llite/llite_nfs.c
+++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c
@@ -169,22 +169,12 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren
/* N.B. d_obtain_alias() drops inode ref on error */
result = d_obtain_alias(inode);
if (!IS_ERR(result)) {
- int rc;
-
- rc = ll_d_init(result);
- if (rc < 0) {
- dput(result);
- result = ERR_PTR(rc);
- } else {
- struct ll_dentry_data *ldd = ll_d2d(result);
-
- /*
- * Need to signal to the ll_intent_file_open that
- * we came from NFS and so opencache needs to be
- * enabled for this one
- */
- ldd->lld_nfs_dentry = 1;
- }
+ /*
+ * Need to signal to the ll_intent_file_open that
+ * we came from NFS and so opencache needs to be
+ * enabled for this one
+ */
+ ll_d2d(result)->lld_nfs_dentry = 1;
}
return result;
@@ -226,7 +216,7 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen,
static int ll_nfs_get_name_filldir(struct dir_context *ctx, const char *name,
int namelen, loff_t hash, u64 ino,
- unsigned type)
+ unsigned int type)
{
/* It is hack to access lde_fid for comparison with lgd_fid.
* So the input 'name' must be part of the 'lu_dirent'.