PATCH for 2.4.3 - tinny mount code cleanup (kernel 0.97 compatibility)
From: Martin Dalecki <[email protected]>
The attached patch is fixing georgeous "backward compatibility" in the mount system command. It is removing two useless defines in the kernel headers and finally doubles the number of possible flags for the mount command.
Please apply.
You have it all backwards. Your patch halves the number of possible flags. The present kernel can use 32 (or 31) flags.
@@ -1317,10 +1313,6 @@
struct super_block *sb;
int retval = 0;
- /* Discard magic */
- if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
- flags &= ~MS_MGC_MSK;
-
/* Basic sanity checks */
if (!dir_name || !*dir_name || !memchr(dir_name, 0, PAGE_SIZE))You see what this code does: if the top half has this old magic (as it has today in 100% of all Linux installations), then the top half is ignored.
If the value is non-conventional, it can be used to mean something.
Maybe you did not realize that mount still puts that value there? The mount we use today will be around for many years to come. This "discard magic" part cannot be removed within five years.
Andries
Quoted 25 lines · [email protected] wrote:
From: Martin Dalecki <[email protected]>
The attached patch is fixing georgeous "backward compatibility" in the mount system command. It is removing two useless defines in the kernel headers and finally doubles the number of possible flags for the mount command.
Please apply.
You have it all backwards. Your patch halves the number of possible flags. The present kernel can use 32 (or 31) flags.
@@ -1317,10 +1313,6 @@ struct super_block *sb; int retval = 0; - /* Discard magic */ - if ((flags & MS_MGC_MSK) == MS_MGC_VAL) - flags &= ~MS_MGC_MSK; - /* Basic sanity checks */ if (!dir_name || !*dir_name || !memchr(dir_name, 0, PAGE_SIZE))
Quoted 6 lines
You see what this code does: if the top half has this old magic (as it has today in 100% of all Linux installations), then the top half is ignored.
If the value is non-conventional, it can be used to mean something.Maybe you did not realize that mount still puts that value there?
Oops typo in find ./ ... grep on my side maybe?
Anyway at least the comment there is at best missleading...
Quoted 9 lines
The mount we use today will be around for many years to come. This "discard magic" part cannot be removed within five years.
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 4 lines
- phone: +49 214 8656 283 - job: eVision-Ventures AG, LEV .de (MY OPINIONS ARE MY OWN!) - langs: de_DE.ISO8859-1, en_US, pl_PL.ISO8859-2, last ressort: ru_RU.KOI8-R