Skip to content

Commit

Permalink
CIFS: Rename Get/FreeXid and make them work with unsigned int
Browse files Browse the repository at this point in the history
Acked-by: Jeff Layton <[email protected]>
Signed-off-by: Pavel Shilovsky <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
piastry authored and smfrench committed Jul 24, 2012
1 parent 2e6e02a commit 6d5786a
Show file tree
Hide file tree
Showing 14 changed files with 375 additions and 352 deletions.
7 changes: 4 additions & 3 deletions fs/cifs/cifs_dfs_ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
struct cifs_sb_info *cifs_sb;
struct cifs_ses *ses;
char *full_path;
int xid, i;
unsigned int xid;
int i;
int rc;
struct vfsmount *mnt;
struct tcon_link *tlink;
Expand All @@ -302,11 +303,11 @@ static struct vfsmount *cifs_dfs_do_automount(struct dentry *mntpt)
}
ses = tlink_tcon(tlink)->ses;

xid = GetXid();
xid = get_xid();
rc = get_dfs_path(xid, ses, full_path + 1, cifs_sb->local_nls,
&num_referrals, &referrals,
cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
FreeXid(xid);
free_xid(xid);

cifs_put_tlink(tlink);

Expand Down
21 changes: 12 additions & 9 deletions fs/cifs/cifsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1153,15 +1153,16 @@ static struct cifs_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb,
__u16 fid, u32 *pacllen)
{
struct cifs_ntsd *pntsd = NULL;
int xid, rc;
unsigned int xid;
int rc;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);

if (IS_ERR(tlink))
return ERR_CAST(tlink);

xid = GetXid();
xid = get_xid();
rc = CIFSSMBGetCIFSACL(xid, tlink_tcon(tlink), fid, &pntsd, pacllen);
FreeXid(xid);
free_xid(xid);

cifs_put_tlink(tlink);

Expand All @@ -1176,7 +1177,8 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
{
struct cifs_ntsd *pntsd = NULL;
int oplock = 0;
int xid, rc, create_options = 0;
unsigned int xid;
int rc, create_options = 0;
__u16 fid;
struct cifs_tcon *tcon;
struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
Expand All @@ -1185,7 +1187,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
return ERR_CAST(tlink);

tcon = tlink_tcon(tlink);
xid = GetXid();
xid = get_xid();

if (backup_cred(cifs_sb))
create_options |= CREATE_OPEN_BACKUP_INTENT;
Expand All @@ -1199,7 +1201,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
}

cifs_put_tlink(tlink);
FreeXid(xid);
free_xid(xid);

cFYI(1, "%s: rc = %d ACL len %d", __func__, rc, *pacllen);
if (rc)
Expand Down Expand Up @@ -1230,7 +1232,8 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
struct inode *inode, const char *path, int aclflag)
{
int oplock = 0;
int xid, rc, access_flags, create_options = 0;
unsigned int xid;
int rc, access_flags, create_options = 0;
__u16 fid;
struct cifs_tcon *tcon;
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
Expand All @@ -1240,7 +1243,7 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
return PTR_ERR(tlink);

tcon = tlink_tcon(tlink);
xid = GetXid();
xid = get_xid();

if (backup_cred(cifs_sb))
create_options |= CREATE_OPEN_BACKUP_INTENT;
Expand All @@ -1263,7 +1266,7 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,

CIFSSMBClose(xid, tcon, fid);
out:
FreeXid(xid);
free_xid(xid);
cifs_put_tlink(tlink);
return rc;
}
Expand Down
6 changes: 3 additions & 3 deletions fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifs_tcon *tcon = cifs_sb_master_tcon(cifs_sb);
int rc = -EOPNOTSUPP;
int xid;
unsigned int xid;

xid = GetXid();
xid = get_xid();

buf->f_type = CIFS_MAGIC_NUMBER;

Expand Down Expand Up @@ -197,7 +197,7 @@ cifs_statfs(struct dentry *dentry, struct kstatfs *buf)
if (rc)
rc = SMBOldQFSInfo(xid, tcon, buf);

FreeXid(xid);
free_xid(xid);
return 0;
}

Expand Down
Loading

0 comments on commit 6d5786a

Please sign in to comment.