]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/nfs/dir.c
NFS: Fix an Oops in the NFSv4 atomic open code
[net-next-2.6.git] / fs / nfs / dir.c
index bd91b2778315501cefe36bfbbf2cbb097eafa836..e257172d438c08afe374c99fe0e7c80af51efe6c 100644 (file)
@@ -1110,7 +1110,7 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
        if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
                goto no_open_dput;
        /* We can't create new files, or truncate existing ones here */
-       openflags &= ~(O_CREAT|O_TRUNC);
+       openflags &= ~(O_CREAT|O_EXCL|O_TRUNC);
 
        /*
         * Note: we're not holding inode->i_mutex and so may be racing with