OSDN Git Service

[PATCH] isofs driver ignore parameters
authorHorms <horms@debian.org>
Tue, 16 Aug 2005 08:38:09 +0000 (17:38 +0900)
committerMarcelo Tosatti <marcelo@dmt.cnet>
Tue, 16 Aug 2005 15:09:03 +0000 (12:09 -0300)
commit3fcb3e818e6bb1cdf742b77a382844d117c41b26
treee38358e15cfb5c2c5e8eec93b3f15a459e9b958b
parent3e6c661ddb88083186ef55ced851d5a834bc34c0
[PATCH] isofs driver ignore parameters

It seems that Alexander Pytlev's original (simple) patch was correct.

Without it the logic looks a bit like this.

while (...) {
if iocharset
...
else if map
...
if session
...
if sbsector
...
else if check
...
...
else
return 1;
}

Now, if iocharset, map or session are matched, then none of the if or
else if clauses under sbsector will match (that is none of these clauses
match iocharset, map or session), and thus the else clause will be hit,
and the function will return 1 without parsing any furhter options.

With Alexander's fix, the if session and if sbsector clauses
become else if, and its easy to see that the return 1 won't
be premeturely called.

I have tested that this patch works using the testcase options
iocharset=koi8-r,gid=100, and checking that gid is set correctly
with the patch, and incorrectly without.

Here is the patch and signoff again, just for the record.
I will send a second patch to clean up the *value = 0 code
that Marcelo cast concerns over - its bogus but harmless.

Signed-off-by: Horms <horms@verge.net.au>
fs/isofs/inode.c