Re: [PATCH] CIFS: Fix the conflict between rwpidforward and rw mount options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/8/27 Pavel Shilovsky <piastry@xxxxxxxxxxx>:
> Both these options are started with "rw" - that's why the first one
> isn't switched on even if it is specified. Fix this by adding a length
> check for "rw" option check.
>
> Cc: <stable@xxxxxxxxxx>
> Signed-off-by: Pavel Shilovsky <piastry@xxxxxxxxxxx>
> ---
>  fs/cifs/connect.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 633c246..f4af4cc 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -1298,7 +1298,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
>                        /* ignore */
>                } else if (strnicmp(data, "guest", 5) == 0) {
>                        /* ignore */
> -               } else if (strnicmp(data, "rw", 2) == 0) {
> +               } else if (strnicmp(data, "rw", 2) == 0 && strlen(data) == 2) {
>                        /* ignore */
>                } else if (strnicmp(data, "ro", 2) == 0) {
>                        /* ignore */
> @@ -1401,7 +1401,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
>                        vol->server_ino = 1;
>                } else if (strnicmp(data, "noserverino", 9) == 0) {
>                        vol->server_ino = 0;
> -               } else if (strnicmp(data, "rwpidforward", 4) == 0) {
> +               } else if (strnicmp(data, "rwpidforward", 12) == 0) {
>                        vol->rwpidforward = 1;
>                } else if (strnicmp(data, "cifsacl", 7) == 0) {
>                        vol->cifs_acl = 1;
> --
> 1.7.1
>
>

Sorry for the spam - forgot to change the patch version.

-- 
Best regards,
Pavel Shilovsky.
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux