Whamcloud - gitweb
Revert "LU-3544 nfs: writing to new files will return ENOENT"
authorOleg Drokin <oleg.drokin@intel.com>
Sat, 31 Aug 2013 18:42:51 +0000 (14:42 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 31 Aug 2013 18:42:51 +0000 (14:42 -0400)
This commit created a problem lu3765 - crash of 2.1 servers when
exposed to clients with this patch and we don't have a robust
solution in sight for it, so reverting

This reverts commit 77a3c625c733edfaa748d2c7130d5635ee63ce15.

lustre/llite/file.c

index 52d4519..72197d9 100644 (file)
@@ -360,6 +360,8 @@ static int ll_intent_file_open(struct file *file, void *lmm,
 {
         struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode);
         struct dentry *parent = file->f_dentry->d_parent;
+        const char *name = file->f_dentry->d_name.name;
+        const int len = file->f_dentry->d_name.len;
         struct md_op_data *op_data;
         struct ptlrpc_request *req;
         __u32 opc = LUSTRE_OPC_ANY;
@@ -384,10 +386,9 @@ static int ll_intent_file_open(struct file *file, void *lmm,
                         opc = LUSTRE_OPC_CREATE;
         }
 
-       op_data  = ll_prep_md_op_data(NULL, parent->d_inode,
-                                     file->f_dentry->d_inode, NULL, 0,
-                                     O_RDWR, opc, NULL);
-
+        op_data  = ll_prep_md_op_data(NULL, parent->d_inode,
+                                      file->f_dentry->d_inode, name, len,
+                                      O_RDWR, opc, NULL);
         if (IS_ERR(op_data))
                 RETURN(PTR_ERR(op_data));