2010-09-07 05:56:03

by Fabio Olive Leite

[permalink] [raw]
Subject: [PATCH] Remove incorrect do_vfs_lock message

The do_vfs_lock function on fs/nfs/file.c is only called if NLM is
not being used, via the -onolock mount option. Therefore it cannot
really be "out of sync with lock manager" when the local locking
function called returns an error, as there will be no corresponding
call to the NLM. For details, simply check the if/else on do_setlk
and do_unlk on fs/nfs/file.c.

Signed-Off-By: Fabio Olive Leite <[email protected]>

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -723,10 +723,6 @@ static int do_vfs_lock(struct file *file, struct file_lock *fl)
default:
BUG();
}
- if (res < 0)
- dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager"
- " - error %d!\n",
- __func__, res);
return res;
}


Please keep me copied as I don't subscribe to the list.

Regards,
Fábio Olivé
--
TcheLinux.org, OeSC-Livre.org, Chapecó, SC
ex sed lex awk yacc, e pluribus unix, amem


2010-09-07 17:25:50

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [PATCH] Remove incorrect do_vfs_lock message

Looks right to me.

On Tue, Sep 07, 2010 at 02:56:01AM -0300, Fabio Olive Leite wrote:
> The do_vfs_lock function on fs/nfs/file.c is only called if NLM is
> not being used, via the -onolock mount option. Therefore it cannot
> really be "out of sync with lock manager" when the local locking
> function called returns an error, as there will be no corresponding
> call to the NLM. For details, simply check the if/else on do_setlk
> and do_unlk on fs/nfs/file.c.
>=20
> Signed-Off-By: Fabio Olive Leite <[email protected]>
>=20
> diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> --- a/fs/nfs/file.c
> +++ b/fs/nfs/file.c
> @@ -723,10 +723,6 @@ static int do_vfs_lock(struct file *file, struct=
file_lock *fl)
> default:
> BUG();
> }
> - if (res < 0)
> - dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager"
> - " - error %d!\n",
> - __func__, res);
> return res;
> }
> =20
>=20
> Please keep me copied as I don't subscribe to the list.
>=20
> Regards,
> F=C3=A1bio Oliv=C3=A9
> --=20
> TcheLinux.org, OeSC-Livre.org, Chapec=C3=B3, SC
> ex sed lex awk yacc, e pluribus unix, amem
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" =
in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2010-09-07 17:38:56

by Jeff Layton

[permalink] [raw]
Subject: Re: [PATCH] Remove incorrect do_vfs_lock message

On Tue, 7 Sep 2010 02:56:01 -0300
=46abio Olive Leite <[email protected]> wrote:

> The do_vfs_lock function on fs/nfs/file.c is only called if NLM is
> not being used, via the -onolock mount option. Therefore it cannot
> really be "out of sync with lock manager" when the local locking
> function called returns an error, as there will be no corresponding
> call to the NLM. For details, simply check the if/else on do_setlk
> and do_unlk on fs/nfs/file.c.
>=20
> Signed-Off-By: Fabio Olive Leite <[email protected]>
>=20
> diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> --- a/fs/nfs/file.c
> +++ b/fs/nfs/file.c
> @@ -723,10 +723,6 @@ static int do_vfs_lock(struct file *file, struct=
file_lock *fl)
> default:
> BUG();
> }
> - if (res < 0)
> - dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager"
> - " - error %d!\n",
> - __func__, res);
> return res;
> }
> =20
>=20
> Please keep me copied as I don't subscribe to the list.
>=20
> Regards,
> F=E1bio Oliv=E9

Reviewed-by: Jeff Layton <[email protected]>

2010-09-07 18:24:24

by Trond Myklebust

[permalink] [raw]
Subject: Re: [PATCH] Remove incorrect do_vfs_lock message

On Tue, 2010-09-07 at 13:38 -0400, Jeff Layton wrote:
> On Tue, 7 Sep 2010 02:56:01 -0300
> Fabio Olive Leite <[email protected]> wrote:
>=20
> > The do_vfs_lock function on fs/nfs/file.c is only called if NLM is
> > not being used, via the -onolock mount option. Therefore it cannot
> > really be "out of sync with lock manager" when the local locking
> > function called returns an error, as there will be no corresponding
> > call to the NLM. For details, simply check the if/else on do_setlk
> > and do_unlk on fs/nfs/file.c.
> >=20
> > Signed-Off-By: Fabio Olive Leite <[email protected]>
> >=20
> > diff --git a/fs/nfs/file.c b/fs/nfs/file.c
> > --- a/fs/nfs/file.c
> > +++ b/fs/nfs/file.c
> > @@ -723,10 +723,6 @@ static int do_vfs_lock(struct file *file, stru=
ct file_lock *fl)
> > default:
> > BUG();
> > }
> > - if (res < 0)
> > - dprintk(KERN_WARNING "%s: VFS is out of sync with lock manager"
> > - " - error %d!\n",
> > - __func__, res);
> > return res;
> > }
> > =20
> >=20
> > Please keep me copied as I don't subscribe to the list.
> >=20
> > Regards,
> > F=C3=A1bio Oliv=C3=A9
>=20
> Reviewed-by: Jeff Layton <[email protected]>

Applied (after removing the ^M)...

Trond