Re: [PATCH 5/5] NFS: clear fsinfo before sendign rpc

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

 



On Wed, Sep 29, 2010 at 7:10 AM, Benny Halevy <bhalevy@xxxxxxxxxxx> wrote:
> To initialize all values to zero, in case the server or protocol version
> do no support particular attributes.

Sorry for the delayed response, but...

Zero is not an appropriate default for many of the values.  Further,
decode_fsinfo sets a default for each value, even in cases where the
server or protocol version do not support particular attributes.  So
this patch seems to server no purpose.

Fred

>
> Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
> ---
>  fs/nfs/client.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfs/client.c b/fs/nfs/client.c
> index 23d740c..beb206e 100644
> --- a/fs/nfs/client.c
> +++ b/fs/nfs/client.c
> @@ -942,6 +942,7 @@ static int nfs_probe_fsinfo(struct nfs_server *server, struct nfs_fh *mntfh, str
>                        goto out_error;
>        }
>
> +       memset(&fsinfo, 0, sizeof(fsinfo));
>        fsinfo.fattr = fattr;
>        error = clp->rpc_ops->fsinfo(server, mntfh, &fsinfo);
>        if (error < 0)
> --
> 1.7.2.3
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux