Skip to content

Commit 65c4976

Browse files
paliSteve French
authored andcommitted
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: Pali Rohár <pali@kernel.org> Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.com> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent a46221f commit 65c4976

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

fs/smb/client/cifsglob.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,7 @@ struct cifs_cred {
215215

216216
struct cifs_open_info_data {
217217
bool adjust_tz;
218-
union {
219-
bool reparse_point;
220-
bool symlink;
221-
};
218+
bool reparse_point;
222219
struct {
223220
/* ioctl response buffer */
224221
struct {

fs/smb/client/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ cifs_get_file_info(struct file *filp)
990990
/* TODO: add support to query reparse tag */
991991
data.adjust_tz = false;
992992
if (data.symlink_target) {
993-
data.symlink = true;
993+
data.reparse_point = true;
994994
data.reparse.tag = IO_REPARSE_TAG_SYMLINK;
995995
}
996996
path = build_path_from_dentry(dentry, page);

fs/smb/client/smb1ops.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ static int cifs_query_path_info(const unsigned int xid,
551551
int rc;
552552
FILE_ALL_INFO fi = {};
553553

554-
data->symlink = false;
554+
data->reparse_point = false;
555555
data->adjust_tz = false;
556556

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

0 commit comments

Comments
 (0)