summaryrefslogtreecommitdiffstats
path: root/fs/cifs/link.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-09-16 13:40:25 +0200
committerSteve French <smfrench@gmail.com>2014-09-16 13:48:20 +0200
commit364d42930d96a872b2076deeb9c24f9ff132de34 (patch)
treef903456803ea800d504df9bb2ec484cae2146fac /fs/cifs/link.c
parentUpdate version number displayed by modinfo for cifs.ko (diff)
downloadlinux-364d42930d96a872b2076deeb9c24f9ff132de34.tar.xz
linux-364d42930d96a872b2076deeb9c24f9ff132de34.zip
Fix mfsymlinks file size check
If the mfsymlinks file size has changed (e.g. the file no longer represents an emulated symlink) we were not returning an error properly. Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'fs/cifs/link.c')
-rw-r--r--fs/cifs/link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c
index a5c2812ead68..5657416d3483 100644
--- a/fs/cifs/link.c
+++ b/fs/cifs/link.c
@@ -343,9 +343,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
if (rc)
return rc;
- if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE))
+ if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
+ rc = -ENOENT;
/* it's not a symlink */
goto out;
+ }
io_parms.netfid = fid.netfid;
io_parms.pid = current->tgid;