diff mbox

[linux-cifs-client] add check for nameidata before accessing it

Message ID 4a4634330911191305q69e98671qfa4089592cdd71cf@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shirish Pargaonkar Nov. 19, 2009, 9:05 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 627a60a..32771f5 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -643,7 +643,7 @@  cifs_lookup(struct inode *parent_dir_inode, struct
dentry *direntry,
         * O_EXCL: optimize away the lookup, but don't hash the dentry. Let
         * the VFS handle the create.
         */
-       if (nd->flags & LOOKUP_EXCL) {
+       if (nd && (nd->flags & LOOKUP_EXCL)) {
                d_instantiate(direntry, NULL);
                return 0;