diff options
author | Steve French <smfrench@gmail.com> | 2014-09-16 07:40:25 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2014-09-16 07:48:20 -0400 |
commit | 364d42930d96a872b2076deeb9c24f9ff132de34 (patch) | |
tree | f903456803ea800d504df9bb2ec484cae2146fac /fs | |
parent | 69af38dbc5b44e90dde35af4a1df3f5510809a1a (diff) |
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')
-rw-r--r-- | fs/cifs/link.c | 4 |
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, | |||
343 | if (rc) | 343 | if (rc) |
344 | return rc; | 344 | return rc; |
345 | 345 | ||
346 | if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) | 346 | if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) { |
347 | rc = -ENOENT; | ||
347 | /* it's not a symlink */ | 348 | /* it's not a symlink */ |
348 | goto out; | 349 | goto out; |
350 | } | ||
349 | 351 | ||
350 | io_parms.netfid = fid.netfid; | 352 | io_parms.netfid = fid.netfid; |
351 | io_parms.pid = current->tgid; | 353 | io_parms.pid = current->tgid; |