]> Pileus Git - ~andy/linux/blobdiff - drivers/staging/lustre/lustre/llite/namei.c
staging/lustre/llite: don't check for O_CREAT in it_create_mode
[~andy/linux] / drivers / staging / lustre / lustre / llite / namei.c
index 804451fabfbf39dce069b3159973b9b47274edae..52422338a666e4153776d1591eb33634bd0d022c 100644 (file)
@@ -523,8 +523,7 @@ static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
        icbd.icbd_childp = &dentry;
        icbd.icbd_parent = parent;
 
-       if (it->it_op & IT_CREAT ||
-           (it->it_op & IT_OPEN && it->it_create_mode & O_CREAT))
+       if (it->it_op & IT_CREAT)
                opc = LUSTRE_OPC_CREATE;
        else
                opc = LUSTRE_OPC_ANY;
@@ -623,7 +622,7 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
                return -ENOMEM;
 
        it->it_op = IT_OPEN;
-       if (mode) {
+       if (open_flags & O_CREAT) {
                it->it_op |= IT_CREAT;
                lookup_flags |= LOOKUP_CREATE;
        }