aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/options.c
diff options
context:
space:
mode:
authorVyacheslav Dubeyko <slava@dubeyko.com>2014-03-03 18:38:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-04 10:55:49 -0500
commitbd2c00353286d63542a8a0896a8c747f7c880edd (patch)
treee81b6691f146ab64c451b0c7e31e9d7ebd1cf894 /fs/hfsplus/options.c
parentdb5d711e2db776f18219b033e5dc4fb7e4264dd7 (diff)
hfsplus: fix remount issue
Current implementation of HFS+ driver has small issue with remount option. Namely, for example, you are unable to remount from RO mode into RW mode by means of command "mount -o remount,rw /dev/loop0 /mnt/hfsplus". Trying to execute sequence of commands results in an error message: mount /dev/loop0 /mnt/hfsplus mount -o remount,ro /dev/loop0 /mnt/hfsplus mount -o remount,rw /dev/loop0 /mnt/hfsplus mount: you must specify the filesystem type mount -t hfsplus -o remount,rw /dev/loop0 /mnt/hfsplus mount: /mnt/hfsplus not mounted or bad option The reason of such issue is failure of mount syscall: mount("/dev/loop0", "/mnt/hfsplus", 0x2282a60, MS_MGC_VAL|MS_REMOUNT, NULL) = -1 EINVAL (Invalid argument) Namely, hfsplus_parse_options_remount() method receives empty "input" argument and return false in such case. As a result, hfsplus_remount() returns -EINVAL error code. This patch fixes the issue by means of return true for the case of empty "input" argument in hfsplus_parse_options_remount() method. Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/options.c')
-rw-r--r--fs/hfsplus/options.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/hfsplus/options.c b/fs/hfsplus/options.c
index 968eab5bc1f5..68537e8b7a09 100644
--- a/fs/hfsplus/options.c
+++ b/fs/hfsplus/options.c
@@ -75,7 +75,7 @@ int hfsplus_parse_options_remount(char *input, int *force)
75 int token; 75 int token;
76 76
77 if (!input) 77 if (!input)
78 return 0; 78 return 1;
79 79
80 while ((p = strsep(&input, ",")) != NULL) { 80 while ((p = strsep(&input, ",")) != NULL) {
81 if (!*p) 81 if (!*p)