diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index a8693632235f..7c732cb44164 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -234,6 +234,8 @@ cifs_unix_basic_to_fattr(struct cifs_fattr *fattr, FILE_UNIX_BASIC_INFO *info, | |||
234 | fattr->cf_atime = cifs_NTtimeToUnix(info->LastAccessTime); | 234 | fattr->cf_atime = cifs_NTtimeToUnix(info->LastAccessTime); |
235 | fattr->cf_mtime = cifs_NTtimeToUnix(info->LastModificationTime); | 235 | fattr->cf_mtime = cifs_NTtimeToUnix(info->LastModificationTime); |
236 | fattr->cf_ctime = cifs_NTtimeToUnix(info->LastStatusChange); | 236 | fattr->cf_ctime = cifs_NTtimeToUnix(info->LastStatusChange); |
237 | /* old POSIX extensions don't get create time */ | ||
238 | |||
237 | fattr->cf_mode = le64_to_cpu(info->Permissions); | 239 | fattr->cf_mode = le64_to_cpu(info->Permissions); |
238 | 240 | ||
239 | /* | 241 | /* |
@@ -2024,6 +2026,19 @@ int cifs_getattr(const struct path *path, struct kstat *stat, | |||
2024 | stat->blksize = CIFS_MAX_MSGSIZE; | 2026 | stat->blksize = CIFS_MAX_MSGSIZE; |
2025 | stat->ino = CIFS_I(inode)->uniqueid; | 2027 | stat->ino = CIFS_I(inode)->uniqueid; |
2026 | 2028 | ||
2029 | /* old CIFS Unix Extensions doesn't return create time */ | ||
2030 | if (CIFS_I(inode)->createtime) { | ||
2031 | stat->result_mask |= STATX_BTIME; | ||
2032 | stat->btime = | ||
2033 | cifs_NTtimeToUnix(cpu_to_le64(CIFS_I(inode)->createtime)); | ||
2034 | } | ||
2035 | |||
2036 | stat->attributes_mask |= (STATX_ATTR_COMPRESSED | STATX_ATTR_ENCRYPTED); | ||
2037 | if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_COMPRESSED) | ||
2038 | stat->attributes |= STATX_ATTR_COMPRESSED; | ||
2039 | if (CIFS_I(inode)->cifsAttrs & FILE_ATTRIBUTE_ENCRYPTED) | ||
2040 | stat->attributes |= STATX_ATTR_ENCRYPTED; | ||
2041 | |||
2027 | /* | 2042 | /* |
2028 | * If on a multiuser mount without unix extensions or cifsacl being | 2043 | * If on a multiuser mount without unix extensions or cifsacl being |
2029 | * enabled, and the admin hasn't overridden them, set the ownership | 2044 | * enabled, and the admin hasn't overridden them, set the ownership |