summaryrefslogtreecommitdiffstats
path: root/fs/udf/super.c
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2018-05-10 11:26:17 -0400
committerDeepa Dinamani <deepa.kernel@gmail.com>2018-05-25 18:31:14 -0400
commit0220eddac66daa2afdd6cf6d7d5198226d2abf0b (patch)
tree43e5e612c0386d2e4a3afd59cf5c9cecccbf393b /fs/udf/super.c
parent0a2dfbecb36119c3fa7d815308c6aa90789bbf02 (diff)
udf: Simplify calls to udf_disk_stamp_to_time
Subsequent patches in the series convert inode timestamps to use struct timespec64 instead of struct timespec as part of solving the y2038 problem. commit fd3cfad374d4 ("udf: Convert udf_disk_stamp_to_time() to use mktime64()") eliminated the NULL return condition from udf_disk_stamp_to_time(). udf_time_to_disk_time() is always called with a valid dest pointer and the return value is ignored. Further, caller can as well check the dest pointer being passed in rather than return argument. Make both the functions return void. This will make the inode timestamp conversion simpler. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Cc: jack@suse.com ---- Changes from v1: * fixed the pointer error pointed by Jan
Diffstat (limited to 'fs/udf/super.c')
-rw-r--r--fs/udf/super.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 7949c338efa5..8449e5190530 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -864,6 +864,9 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
864 struct buffer_head *bh; 864 struct buffer_head *bh;
865 uint16_t ident; 865 uint16_t ident;
866 int ret = -ENOMEM; 866 int ret = -ENOMEM;
867#ifdef UDFFS_DEBUG
868 struct timestamp *ts;
869#endif
867 870
868 outstr = kmalloc(128, GFP_NOFS); 871 outstr = kmalloc(128, GFP_NOFS);
869 if (!outstr) 872 if (!outstr)
@@ -882,15 +885,15 @@ static int udf_load_pvoldesc(struct super_block *sb, sector_t block)
882 885
883 pvoldesc = (struct primaryVolDesc *)bh->b_data; 886 pvoldesc = (struct primaryVolDesc *)bh->b_data;
884 887
885 if (udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time, 888 udf_disk_stamp_to_time(&UDF_SB(sb)->s_record_time,
886 pvoldesc->recordingDateAndTime)) { 889 pvoldesc->recordingDateAndTime);
887#ifdef UDFFS_DEBUG 890#ifdef UDFFS_DEBUG
888 struct timestamp *ts = &pvoldesc->recordingDateAndTime; 891 ts = &pvoldesc->recordingDateAndTime;
889 udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n", 892 udf_debug("recording time %04u/%02u/%02u %02u:%02u (%x)\n",
890 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour, 893 le16_to_cpu(ts->year), ts->month, ts->day, ts->hour,
891 ts->minute, le16_to_cpu(ts->typeAndTimezone)); 894 ts->minute, le16_to_cpu(ts->typeAndTimezone));
892#endif 895#endif
893 } 896
894 897
895 ret = udf_dstrCS0toUTF8(outstr, 31, pvoldesc->volIdent, 32); 898 ret = udf_dstrCS0toUTF8(outstr, 31, pvoldesc->volIdent, 32);
896 if (ret < 0) 899 if (ret < 0)