From: zhanghc Date: Thu, 15 Oct 2009 02:49:09 +0000 (+0000) Subject: b=20584 X-Git-Tag: v1_9_290~21 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=16e589b066285d396002800ff14869b9b2462190;p=fs%2Flustre-release.git b=20584 set "IT_CREAT" in the default intent(oit) in function ll_file_open(llite/file.c) if "it_flags" contains O_CREAT i=johann@sun.com i=alexey.lyashkov@sun.com --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 12c2b0c..dd9989c 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -542,6 +542,12 @@ int ll_file_open(struct inode *inode, struct file *file) * already? XXX - NFS implications? */ oit.it_flags &= ~O_EXCL; + /* bug20584, if "it_flags" contains O_CREAT, the file will be + * created if necessary, then "IT_CREAT" should be set to keep + * consistent with it */ + if (oit.it_flags & O_CREAT) + oit.it_op |= IT_CREAT; + it = &oit; }