summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-03-01 12:05:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2013-03-01 12:05:13 -0800
commitcc73dc04c7b3e18ac20ef7770d4964765e4d6ddf (patch)
tree70578f9996176d888ddbd7955b86db13d9ae77d4 /fs/cifs/cifsfs.c
parent5140a8ceaa369d362d0ab7a438a5d99c75ee098d (diff)
parentc51bb0ea40ca038da26b1fa7d450f4078124af03 (diff)
downloadop-kernel-dev-cc73dc04c7b3e18ac20ef7770d4964765e4d6ddf.zip
op-kernel-dev-cc73dc04c7b3e18ac20ef7770d4964765e4d6ddf.tar.gz
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fixes from Steve French: "Four cifs fixes (including for kernel bug #53221 and samba bug #9519)" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: cifs: bugfix for unreclaimed writeback pages in cifs_writev_requeue() cifs: set MAY_SIGN when sec=krb5 POSIX extensions disabled on client due to illegal O_EXCL flag sent to Samba cifs: ensure that cifs_get_root() only traverses directories
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r--fs/cifs/cifsfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 4bad7b1..1a052c0 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -564,6 +564,11 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb)
dentry = ERR_PTR(-ENOENT);
break;
}
+ if (!S_ISDIR(dir->i_mode)) {
+ dput(dentry);
+ dentry = ERR_PTR(-ENOTDIR);
+ break;
+ }
/* skip separators */
while (*s == sep)
OpenPOWER on IntegriCloud