summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-14 18:31:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-14 18:31:07 -0400
commit7a932516f55cdf430c7cce78df2010ff7db6b874 (patch)
treeb116c2551348c798240b26bd831f0cf96dd8d591 /fs/hfsplus/inode.c
parentdc594c39f7a9dcdfd5dbb1a446ac6d06182e2472 (diff)
parente264abeaf9daa3cde9aed8013a6f82b0370425e5 (diff)
Merge tag 'vfs-timespec64' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground
Pull inode timestamps conversion to timespec64 from Arnd Bergmann: "This is a late set of changes from Deepa Dinamani doing an automated treewide conversion of the inode and iattr structures from 'timespec' to 'timespec64', to push the conversion from the VFS layer into the individual file systems. As Deepa writes: 'The series aims to switch vfs timestamps to use struct timespec64. Currently vfs uses struct timespec, which is not y2038 safe. The series involves the following: 1. Add vfs helper functions for supporting struct timepec64 timestamps. 2. Cast prints of vfs timestamps to avoid warnings after the switch. 3. Simplify code using vfs timestamps so that the actual replacement becomes easy. 4. Convert vfs timestamps to use struct timespec64 using a script. This is a flag day patch. Next steps: 1. Convert APIs that can handle timespec64, instead of converting timestamps at the boundaries. 2. Update internal data structures to avoid timestamp conversions' Thomas Gleixner adds: 'I think there is no point to drag that out for the next merge window. The whole thing needs to be done in one go for the core changes which means that you're going to play that catchup game forever. Let's get over with it towards the end of the merge window'" * tag 'vfs-timespec64' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground: pstore: Remove bogus format string definition vfs: change inode times to use struct timespec64 pstore: Convert internal records to timespec64 udf: Simplify calls to udf_disk_stamp_to_time fs: nfs: get rid of memcpys for inode times ceph: make inode time prints to be long long lustre: Use long long type to print inode time fs: add timespec64_truncate()
Diffstat (limited to 'fs/hfsplus/inode.c')
-rw-r--r--fs/hfsplus/inode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index c0c8d433864f..c824f702feec 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -493,9 +493,9 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
493 hfsplus_get_perms(inode, &folder->permissions, 1); 493 hfsplus_get_perms(inode, &folder->permissions, 1);
494 set_nlink(inode, 1); 494 set_nlink(inode, 1);
495 inode->i_size = 2 + be32_to_cpu(folder->valence); 495 inode->i_size = 2 + be32_to_cpu(folder->valence);
496 inode->i_atime = hfsp_mt2ut(folder->access_date); 496 inode->i_atime = timespec_to_timespec64(hfsp_mt2ut(folder->access_date));
497 inode->i_mtime = hfsp_mt2ut(folder->content_mod_date); 497 inode->i_mtime = timespec_to_timespec64(hfsp_mt2ut(folder->content_mod_date));
498 inode->i_ctime = hfsp_mt2ut(folder->attribute_mod_date); 498 inode->i_ctime = timespec_to_timespec64(hfsp_mt2ut(folder->attribute_mod_date));
499 HFSPLUS_I(inode)->create_date = folder->create_date; 499 HFSPLUS_I(inode)->create_date = folder->create_date;
500 HFSPLUS_I(inode)->fs_blocks = 0; 500 HFSPLUS_I(inode)->fs_blocks = 0;
501 if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) { 501 if (folder->flags & cpu_to_be16(HFSPLUS_HAS_FOLDER_COUNT)) {
@@ -531,9 +531,9 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd)
531 init_special_inode(inode, inode->i_mode, 531 init_special_inode(inode, inode->i_mode,
532 be32_to_cpu(file->permissions.dev)); 532 be32_to_cpu(file->permissions.dev));
533 } 533 }
534 inode->i_atime = hfsp_mt2ut(file->access_date); 534 inode->i_atime = timespec_to_timespec64(hfsp_mt2ut(file->access_date));
535 inode->i_mtime = hfsp_mt2ut(file->content_mod_date); 535 inode->i_mtime = timespec_to_timespec64(hfsp_mt2ut(file->content_mod_date));
536 inode->i_ctime = hfsp_mt2ut(file->attribute_mod_date); 536 inode->i_ctime = timespec_to_timespec64(hfsp_mt2ut(file->attribute_mod_date));
537 HFSPLUS_I(inode)->create_date = file->create_date; 537 HFSPLUS_I(inode)->create_date = file->create_date;
538 } else { 538 } else {
539 pr_err("bad catalog entry used to create inode\n"); 539 pr_err("bad catalog entry used to create inode\n");