diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-05 10:52:27 -0600 |
commit | 9514a56753a8d379db36bed424588e1842f2bfcc (patch) | |
tree | d13cdfcd9473f521c3b108770dba57e81e557a30 /fs/cifs/cifsfs.c | |
parent | 4cd7f7a31178ff8a15ad2bc1258b9b2bf2cf51a4 (diff) | |
parent | 6add6967a4a57e2156b96e62f28bcbe1901d16c1 (diff) | |
download | blackbird-obmc-linux-9514a56753a8d379db36bed424588e1842f2bfcc.tar.gz blackbird-obmc-linux-9514a56753a8d379db36bed424588e1842f2bfcc.zip |
Merge branch 'for-grant' of git://git.jdl.com/software/linux-3.0 into devicetree/next
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index f93eb948d071..54b8f1e7da94 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -548,6 +548,12 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) struct inode *dir = dentry->d_inode; struct dentry *child; + if (!dir) { + dput(dentry); + dentry = ERR_PTR(-ENOENT); + break; + } + /* skip separators */ while (*s == sep) s++; @@ -563,10 +569,6 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) mutex_unlock(&dir->i_mutex); dput(dentry); dentry = child; - if (!dentry->d_inode) { - dput(dentry); - dentry = ERR_PTR(-ENOENT); - } } while (!IS_ERR(dentry)); _FreeXid(xid); kfree(full_path); |