diff options
author | Marc Dionne <marc.dionne@auristor.com> | 2017-03-16 17:27:47 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2017-03-16 17:27:47 +0100 |
commit | ab94f5d0dd6fd82e7eeca5e7c8096eaea0a0261f (patch) | |
tree | 790e12f0dff3e1ca370e0245b810eacf0558b6b1 /fs/afs/inode.c | |
parent | afs: Better abort and net error handling (diff) | |
download | linux-ab94f5d0dd6fd82e7eeca5e7c8096eaea0a0261f.tar.xz linux-ab94f5d0dd6fd82e7eeca5e7c8096eaea0a0261f.zip |
afs: Populate and use client modification time
The inode timestamps should be set from the client time
in the status received from the server, rather than the
server time which is meant for internal server use.
Set AFS_SET_MTIME and populate the mtime for operations
that take an input status, such as file/dir creation
and StoreData. If an input time is not provided the
server will set the vnode times based on the current server
time.
In a situation where the server has some skew with the
client, this could lead to the client seeing a timestamp
in the future for a file that it just created or wrote.
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r-- | fs/afs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 4079c832ff27..aae55dd15108 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -85,7 +85,7 @@ static int afs_inode_map_status(struct afs_vnode *vnode, struct key *key) inode->i_uid = vnode->status.owner; inode->i_gid = vnode->status.group; inode->i_size = vnode->status.size; - inode->i_ctime.tv_sec = vnode->status.mtime_server; + inode->i_ctime.tv_sec = vnode->status.mtime_client; inode->i_ctime.tv_nsec = 0; inode->i_atime = inode->i_mtime = inode->i_ctime; inode->i_blocks = 0; |