aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r--fs/cifs/dir.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index aa4ea965b32..32cc96cafa3 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -228,8 +228,15 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
else {
rc = cifs_get_inode_info(&newinode, full_path,
buf, inode->i_sb,xid);
- if(newinode)
+ if(newinode) {
newinode->i_mode = mode;
+ if((oplock & CIFS_CREATE_ACTION) &&
+ (cifs_sb->mnt_cifs_flags &
+ CIFS_MOUNT_SET_UID)) {
+ newinode->i_uid = current->fsuid;
+ newinode->i_gid = current->fsgid;
+ }
+ }
}
if (rc != 0) {