Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 364d4293 authored by Steve French's avatar Steve French
Browse files

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: default avatarSteve French <smfrench@gmail.com>
Reviewed-by: default avatarStefan Metzmacher <metze@samba.org>
parent 69af38db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;