Browse Source

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>
Steve French 11 years ago
parent
commit
364d42930d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      fs/cifs/link.c

+ 3 - 1
fs/cifs/link.c

@@ -343,9 +343,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
 	if (rc)
 	if (rc)
 		return 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 */
 		/* it's not a symlink */
 		goto out;
 		goto out;
+	}
 
 
 	io_parms.netfid = fid.netfid;
 	io_parms.netfid = fid.netfid;
 	io_parms.pid = current->tgid;
 	io_parms.pid = current->tgid;