From: Jan Kara <jack@suse.cz>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: linux-fsdevel@vger.kernel.org, list0570@paradise.net.nz,
Jan Kara <jack@suse.cz>
Subject: [PATCH] fat: Allow time_offset to be upto 13 hours
Date: Wed, 25 Nov 2015 16:42:13 +0100 [thread overview]
Message-ID: <1448466133-2838-1-git-send-email-jack@suse.cz> (raw)
Currently we limit values of time_offset mount option to be between -12
and 12 hours. However e.g. zone GMT+12 can have a DST correction on top
which makes the total time difference 13 hours. Update the checks in
mount option parsing to allow offset of upto 13 hours.
Reported-by: Volker Kuhlmann <list0570@paradise.net.nz>
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/fat/inode.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 509411dd3698..2041031ab1c8 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -1146,7 +1146,11 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
case Opt_time_offset:
if (match_int(&args[0], &option))
return -EINVAL;
- if (option < -12 * 60 || option > 12 * 60)
+ /*
+ * Allow for GMT+-12 zones to have DST like
+ * corrections
+ */
+ if (option < -13 * 60 || option > 13 * 60)
return -EINVAL;
opts->tz_set = 1;
opts->time_offset = option;
--
2.1.4
next reply other threads:[~2015-11-25 15:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 15:42 Jan Kara [this message]
2015-11-25 18:32 ` [PATCH] fat: Allow time_offset to be upto 13 hours OGAWA Hirofumi
2015-11-25 20:22 ` Volker Kuhlmann
2015-11-25 21:52 ` OGAWA Hirofumi
2015-11-25 22:43 ` Volker Kuhlmann
2015-11-26 4:33 ` OGAWA Hirofumi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448466133-2838-1-git-send-email-jack@suse.cz \
--to=jack@suse.cz \
--cc=hirofumi@mail.parknet.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=list0570@paradise.net.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).