aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index e962e75e6f7b..838d9c720a5c 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -235,11 +235,11 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
235 }; 235 };
236 236
237 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 237 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
238 args.uid = (__u64) current->fsuid; 238 args.uid = (__u64) current_fsuid();
239 if (inode->i_mode & S_ISGID) 239 if (inode->i_mode & S_ISGID)
240 args.gid = (__u64) inode->i_gid; 240 args.gid = (__u64) inode->i_gid;
241 else 241 else
242 args.gid = (__u64) current->fsgid; 242 args.gid = (__u64) current_fsgid();
243 } else { 243 } else {
244 args.uid = NO_CHANGE_64; 244 args.uid = NO_CHANGE_64;
245 args.gid = NO_CHANGE_64; 245 args.gid = NO_CHANGE_64;
@@ -271,13 +271,13 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
271 if ((oplock & CIFS_CREATE_ACTION) && 271 if ((oplock & CIFS_CREATE_ACTION) &&
272 (cifs_sb->mnt_cifs_flags & 272 (cifs_sb->mnt_cifs_flags &
273 CIFS_MOUNT_SET_UID)) { 273 CIFS_MOUNT_SET_UID)) {
274 newinode->i_uid = current->fsuid; 274 newinode->i_uid = current_fsuid();
275 if (inode->i_mode & S_ISGID) 275 if (inode->i_mode & S_ISGID)
276 newinode->i_gid = 276 newinode->i_gid =
277 inode->i_gid; 277 inode->i_gid;
278 else 278 else
279 newinode->i_gid = 279 newinode->i_gid =
280 current->fsgid; 280 current_fsgid();
281 } 281 }
282 } 282 }
283 } 283 }
@@ -375,8 +375,8 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
375 .device = device_number, 375 .device = device_number,
376 }; 376 };
377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 377 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
378 args.uid = (__u64) current->fsuid; 378 args.uid = (__u64) current_fsuid();
379 args.gid = (__u64) current->fsgid; 379 args.gid = (__u64) current_fsgid();
380 } else { 380 } else {
381 args.uid = NO_CHANGE_64; 381 args.uid = NO_CHANGE_64;
382 args.gid = NO_CHANGE_64; 382 args.gid = NO_CHANGE_64;
@@ -483,7 +483,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
483 483
484 xid = GetXid(); 484 xid = GetXid();
485 485
486 cFYI(1, (" parent inode = 0x%p name is: %s and dentry = 0x%p", 486 cFYI(1, ("parent inode = 0x%p name is: %s and dentry = 0x%p",
487 parent_dir_inode, direntry->d_name.name, direntry)); 487 parent_dir_inode, direntry->d_name.name, direntry));
488 488
489 /* check whether path exists */ 489 /* check whether path exists */
@@ -515,12 +515,11 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
515 } 515 }
516 516
517 if (direntry->d_inode != NULL) { 517 if (direntry->d_inode != NULL) {
518 cFYI(1, (" non-NULL inode in lookup")); 518 cFYI(1, ("non-NULL inode in lookup"));
519 } else { 519 } else {
520 cFYI(1, (" NULL inode in lookup")); 520 cFYI(1, ("NULL inode in lookup"));
521 } 521 }
522 cFYI(1, 522 cFYI(1, ("Full path: %s inode = 0x%p", full_path, direntry->d_inode));
523 (" Full path: %s inode = 0x%p", full_path, direntry->d_inode));
524 523
525 if (pTcon->unix_ext) 524 if (pTcon->unix_ext)
526 rc = cifs_get_inode_info_unix(&newInode, full_path, 525 rc = cifs_get_inode_info_unix(&newInode, full_path,