Commit 65c49767 authored by Pali Rohár's avatar Pali Rohár Committed by Steve French
Browse files

cifs: Remove symlink member from cifs_open_info_data union



Member 'symlink' is part of the union in struct cifs_open_info_data. Its
value is assigned on few places, but is always read through another union
member 'reparse_point'. So to make code more readable, always use only
'reparse_point' member and drop whole union structure. No function change.

Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Acked-by: default avatarPaulo Alcantara (Red Hat) <pc@manguebit.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent a46221fc
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -215,10 +215,7 @@ struct cifs_cred {

struct cifs_open_info_data {
	bool adjust_tz;
	union {
	bool reparse_point;
		bool symlink;
	};
	struct {
		/* ioctl response buffer */
		struct {
+1 −1
Original line number Diff line number Diff line
@@ -990,7 +990,7 @@ cifs_get_file_info(struct file *filp)
		/* TODO: add support to query reparse tag */
		data.adjust_tz = false;
		if (data.symlink_target) {
			data.symlink = true;
			data.reparse_point = true;
			data.reparse.tag = IO_REPARSE_TAG_SYMLINK;
		}
		path = build_path_from_dentry(dentry, page);
+2 −2
Original line number Diff line number Diff line
@@ -551,7 +551,7 @@ static int cifs_query_path_info(const unsigned int xid,
	int rc;
	FILE_ALL_INFO fi = {};

	data->symlink = false;
	data->reparse_point = false;
	data->adjust_tz = false;

	/* could do find first instead but this returns more info */
@@ -592,7 +592,7 @@ static int cifs_query_path_info(const unsigned int xid,
		/* Need to check if this is a symbolic link or not */
		tmprc = CIFS_open(xid, &oparms, &oplock, NULL);
		if (tmprc == -EOPNOTSUPP)
			data->symlink = true;
			data->reparse_point = true;
		else if (tmprc == 0)
			CIFSSMBClose(xid, tcon, fid.netfid);
	}