diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index d277f71abe0b8e653ef0e439782c2ee930388bbf..d2854cd2f4f580778fdd14ed52ba4f750cbebdac 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -462,6 +462,9 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
 		err = ceph_security_init_secctx(dentry, mode, &as_ctx);
 		if (err < 0)
 			goto out_ctx;
+	} else if (!d_in_lookup(dentry)) {
+		/* If it's not being looked up, it's negative */
+		return -ENOENT;
 	}
 
 	/* do the open */