aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsacl.c
diff options
context:
space:
mode:
authorPavel Shilovsky <pshilovsky@samba.org>2012-06-20 03:21:16 -0400
committerSteve French <smfrench@gmail.com>2012-07-24 11:25:08 -0400
commit6d5786a34d98bffb8ad50d8053d1e53231fe0636 (patch)
treeae49860befc52cb18dfb2b86929878a204289601 /fs/cifs/cifsacl.c
parent2e6e02ab6ddbd539fd7e092973daf057adbd53dc (diff)
CIFS: Rename Get/FreeXid and make them work with unsigned int
Acked-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsacl.c')
-rw-r--r--fs/cifs/cifsacl.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 1885da4fca82..05f4dc263a23 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -1153,15 +1153,16 @@ static struct cifs_ntsd *get_cifs_acl_by_fid(struct cifs_sb_info *cifs_sb,
1153 __u16 fid, u32 *pacllen) 1153 __u16 fid, u32 *pacllen)
1154{ 1154{
1155 struct cifs_ntsd *pntsd = NULL; 1155 struct cifs_ntsd *pntsd = NULL;
1156 int xid, rc; 1156 unsigned int xid;
1157 int rc;
1157 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); 1158 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
1158 1159
1159 if (IS_ERR(tlink)) 1160 if (IS_ERR(tlink))
1160 return ERR_CAST(tlink); 1161 return ERR_CAST(tlink);
1161 1162
1162 xid = GetXid(); 1163 xid = get_xid();
1163 rc = CIFSSMBGetCIFSACL(xid, tlink_tcon(tlink), fid, &pntsd, pacllen); 1164 rc = CIFSSMBGetCIFSACL(xid, tlink_tcon(tlink), fid, &pntsd, pacllen);
1164 FreeXid(xid); 1165 free_xid(xid);
1165 1166
1166 cifs_put_tlink(tlink); 1167 cifs_put_tlink(tlink);
1167 1168
@@ -1176,7 +1177,8 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
1176{ 1177{
1177 struct cifs_ntsd *pntsd = NULL; 1178 struct cifs_ntsd *pntsd = NULL;
1178 int oplock = 0; 1179 int oplock = 0;
1179 int xid, rc, create_options = 0; 1180 unsigned int xid;
1181 int rc, create_options = 0;
1180 __u16 fid; 1182 __u16 fid;
1181 struct cifs_tcon *tcon; 1183 struct cifs_tcon *tcon;
1182 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb); 1184 struct tcon_link *tlink = cifs_sb_tlink(cifs_sb);
@@ -1185,7 +1187,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
1185 return ERR_CAST(tlink); 1187 return ERR_CAST(tlink);
1186 1188
1187 tcon = tlink_tcon(tlink); 1189 tcon = tlink_tcon(tlink);
1188 xid = GetXid(); 1190 xid = get_xid();
1189 1191
1190 if (backup_cred(cifs_sb)) 1192 if (backup_cred(cifs_sb))
1191 create_options |= CREATE_OPEN_BACKUP_INTENT; 1193 create_options |= CREATE_OPEN_BACKUP_INTENT;
@@ -1199,7 +1201,7 @@ static struct cifs_ntsd *get_cifs_acl_by_path(struct cifs_sb_info *cifs_sb,
1199 } 1201 }
1200 1202
1201 cifs_put_tlink(tlink); 1203 cifs_put_tlink(tlink);
1202 FreeXid(xid); 1204 free_xid(xid);
1203 1205
1204 cFYI(1, "%s: rc = %d ACL len %d", __func__, rc, *pacllen); 1206 cFYI(1, "%s: rc = %d ACL len %d", __func__, rc, *pacllen);
1205 if (rc) 1207 if (rc)
@@ -1230,7 +1232,8 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
1230 struct inode *inode, const char *path, int aclflag) 1232 struct inode *inode, const char *path, int aclflag)
1231{ 1233{
1232 int oplock = 0; 1234 int oplock = 0;
1233 int xid, rc, access_flags, create_options = 0; 1235 unsigned int xid;
1236 int rc, access_flags, create_options = 0;
1234 __u16 fid; 1237 __u16 fid;
1235 struct cifs_tcon *tcon; 1238 struct cifs_tcon *tcon;
1236 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); 1239 struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
@@ -1240,7 +1243,7 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
1240 return PTR_ERR(tlink); 1243 return PTR_ERR(tlink);
1241 1244
1242 tcon = tlink_tcon(tlink); 1245 tcon = tlink_tcon(tlink);
1243 xid = GetXid(); 1246 xid = get_xid();
1244 1247
1245 if (backup_cred(cifs_sb)) 1248 if (backup_cred(cifs_sb))
1246 create_options |= CREATE_OPEN_BACKUP_INTENT; 1249 create_options |= CREATE_OPEN_BACKUP_INTENT;
@@ -1263,7 +1266,7 @@ int set_cifs_acl(struct cifs_ntsd *pnntsd, __u32 acllen,
1263 1266
1264 CIFSSMBClose(xid, tcon, fid); 1267 CIFSSMBClose(xid, tcon, fid);
1265out: 1268out:
1266 FreeXid(xid); 1269 free_xid(xid);
1267 cifs_put_tlink(tlink); 1270 cifs_put_tlink(tlink);
1268 return rc; 1271 return rc;
1269} 1272}