On Sun, Feb 6, 2011 at 2:41 PM, Fred Isaman <iisaman@xxxxxxxxxx> wrote: > On Sat, Feb 5, 2011 at 11:46 AM, William A. (Andy) Adamson > <androsadamson@xxxxxxxxx> wrote: >> On Fri, Feb 4, 2011 at 4:51 PM, Fred Isaman <iisaman@xxxxxxxxxx> wrote: >>> On Fri, Feb 4, 2011 at 4:33 PM, <andros@xxxxxxxxxx> wrote: >>>> From: Andy Adamson <andros@xxxxxxxxxx> >>>> >>>> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx> >>>> --- >>>> áfs/nfs/nfs4proc.c | á 11 ++++++++--- >>>> á1 files changed, 8 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c >>>> index 9c50be7..fb22cbf 100644 >>>> --- a/fs/nfs/nfs4proc.c >>>> +++ b/fs/nfs/nfs4proc.c >>>> @@ -1574,7 +1574,7 @@ static int _nfs4_proc_open(struct nfs4_opendata *data) >>>> á á á áreturn 0; >>>> á} >>>> >>>> -int nfs4_recover_expired_lease(struct nfs_client *clp) >>>> +static int nfs4_client_recover_expired_lease(struct nfs_client *clp) >>>> á{ >>>> á á á áunsigned int loop; >>>> á á á áint ret; >>>> @@ -1593,6 +1593,11 @@ int nfs4_recover_expired_lease(struct nfs_client *clp) >>>> á} >>>> áEXPORT_SYMBOL(nfs4_recover_expired_lease); >>>> >>>> +static int nfs4_recover_expired_lease(struct nfs_server *server) >>>> +{ >>>> + á á á return nfs4_client_recover_expired_lease(server->nfs_client); >>>> +} >>>> + >>> >>> Why are we doing this extra indirection? >> >> As Trond pointed out, it is a lot less intrusive to the existing code. >> >> -->Andy >> > > I must be missing something. What I see is that you are changing the > arguments to a function that is called exactly twice, and creating a > totally unnecessary subfunction nfs4_client_recover_expired_lease. > How is this less intrusive than just directly inlining > nfs4_client_recover_expired_lease? This patch reverts the change made in pnfs_submit: filelayout i/o helpers which changed the argument from nfs_server to nfs_client. which changed the two calls. That is more intrusive to what this patch does which is to leave the two calls alone. Adding nfs4_client_recover_expired_lease lets us call it with struct nfs_client from the data server code without changing the existing calls and is therefore less intrusive. -->Andy > > Fred > -- 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