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: | |||
1755 | int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, | 1755 | int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, |
1756 | struct kstat *stat) | 1756 | struct kstat *stat) |
1757 | { | 1757 | { |
1758 | struct cifs_sb_info *cifs_sb = CIFS_SB(dentry->d_sb); | ||
1759 | struct cifsTconInfo *tcon = cifs_sb_master_tcon(cifs_sb); | ||
1758 | int err = cifs_revalidate_dentry(dentry); | 1760 | int err = cifs_revalidate_dentry(dentry); |
1761 | |||
1759 | if (!err) { | 1762 | if (!err) { |
1760 | generic_fillattr(dentry->d_inode, stat); | 1763 | generic_fillattr(dentry->d_inode, stat); |
1761 | stat->blksize = CIFS_MAX_MSGSIZE; | 1764 | stat->blksize = CIFS_MAX_MSGSIZE; |
1762 | stat->ino = CIFS_I(dentry->d_inode)->uniqueid; | 1765 | stat->ino = CIFS_I(dentry->d_inode)->uniqueid; |
1766 | if ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MULTIUSER) && | ||
1767 | !tcon->unix_ext) { | ||
1768 | if (!cifs_sb->mnt_uid) | ||
1769 | stat->uid = current_fsuid(); | ||
1770 | if (!cifs_sb->mnt_uid) | ||
1771 | stat->gid = current_fsgid(); | ||
1772 | } | ||
1763 | } | 1773 | } |
1764 | return err; | 1774 | return err; |
1765 | } | 1775 | } |