On Wed, 04 Aug 2010 12:31:40 +0530
Suresh Jayaraman <[email protected]> wrote:

> 
> ... as it is done anyway at add_mtab_exit.
> 
> Signed-off-by: Suresh Jayaraman <[email protected]>
> ---
>  mount.cifs.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 9f04261..49fdd08 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -1513,7 +1513,6 @@ add_mtab(char *devname, char *mountpoint, unsigned long 
> flags, const char *fstyp
>       rc = lock_mtab();
>       if (rc) {
>               fprintf(stderr, "cannot lock mtab");
> -             rc = EX_FILEIO;
>               goto add_mtab_exit;
>       }
>  
                ^^^^^^^^^^^
This seems to be fine.

> @@ -1521,7 +1520,6 @@ add_mtab(char *devname, char *mountpoint, unsigned long 
> flags, const char *fstyp
>       if (!pmntfile) {
>               fprintf(stderr, "could not update mount table\n");
>               unlock_mtab();
> -             rc = EX_FILEIO;
>               goto add_mtab_exit;
>       }
                ^^^^^^^^^^^
This looks wrong. If we don't set rc here, then it'll still be 0 and
the code at add_mtab_exit won't set it to EX_FILEIO.

-- 
Jeff Layton <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to