From 968e6d982da010478cf1ee7799f8bb6f855fd8bb Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Sat, 31 Aug 2013 14:42:51 -0400 Subject: [PATCH] Revert "LU-3544 nfs: writing to new files will return ENOENT" 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 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 52d4519..72197d9 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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)); -- 1.8.3.1