]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/cifs/dir.c
Merge branch 'stable/bug.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / fs / cifs / dir.c
index 14d602f178c29de58a5429ba2a099b424f7c771f..ae576fbb5142e508010d53d1506b72fd954575e7 100644 (file)
@@ -57,11 +57,6 @@ build_path_from_dentry(struct dentry *direntry)
        struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
        unsigned seq;
 
-       if (direntry == NULL)
-               return NULL;  /* not much we can do if dentry is freed and
-               we need to reopen the file after it was closed implicitly
-               when the server crashed */
-
        dirsep = CIFS_DIR_SEP(cifs_sb);
        if (tcon->Flags & SMB_SHARE_IS_IN_DFS)
                dfsplen = strnlen(tcon->treeName, MAX_TREE_SIZE + 1);
@@ -641,7 +636,7 @@ lookup_out:
 static int
 cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
 {
-       if (nd->flags & LOOKUP_RCU)
+       if (nd && (nd->flags & LOOKUP_RCU))
                return -ECHILD;
 
        if (direntry->d_inode) {