diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index df29a3a3d80c..7e5b8c39a07a 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1755,11 +1755,21 @@ check_inval: int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { + struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); + struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); int err = cifs_revalidate_dentry(dentry); + if (!err) { generic_fillattr(dentry->d_inode, stat); stat->blksize = CIFS_MAX_MSGSIZE; stat->ino = CIFS_I(dentry->d_inode)->uniqueid; + if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) && + !tcon->unix_ext) { + if (!cifs_sb->mnt_uid) + stat->uid = current_fsuid(); + if (!cifs_sb->mnt_uid) + stat->gid = current_fsgid(); + } } return err; } |