* [PATCH 1/1] pnfs-submit: test for sending LAYOUTRETURN was reversed
@ 2010-06-15 5:01 Fred Isaman
2010-06-15 19:51 ` Benny Halevy
0 siblings, 1 reply; 2+ messages in thread
From: Fred Isaman @ 2010-06-15 5:01 UTC (permalink / raw)
To: linux-nfs
Setting this correctly also simplifies the call to layout_return.
Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
fs/nfs/pnfs.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index edffee3..56d2932 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -731,7 +731,6 @@ pnfs_return_layout_barrier(struct nfs_inode *nfsi,
static int
return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
- const nfs4_stateid *stateid, /* optional */
enum pnfs_layoutreturn_type type, struct pnfs_layout_type *lo,
bool wait)
{
@@ -755,10 +754,7 @@ return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
lrp->args.lseg = *range;
lrp->args.inode = ino;
lrp->lo = lo;
- if (stateid)
- lrp->args.stateid = *stateid;
- else if (lo)
- pnfs_get_layout_stateid(&lrp->args.stateid, lo);
+ pnfs_get_layout_stateid(&lrp->args.stateid, lo);
status = pnfs4_proc_layoutreturn(lrp, wait);
out:
@@ -830,9 +826,8 @@ _pnfs_return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
}
}
- if (stateid && wait)
- status = return_layout(ino, &arg, stateid, type,
- lo, wait);
+ if (!stateid)
+ status = return_layout(ino, &arg, type, lo, wait);
else
pnfs_layout_release(lo, &arg);
}
--
1.6.6.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] pnfs-submit: test for sending LAYOUTRETURN was reversed
2010-06-15 5:01 [PATCH 1/1] pnfs-submit: test for sending LAYOUTRETURN was reversed Fred Isaman
@ 2010-06-15 19:51 ` Benny Halevy
0 siblings, 0 replies; 2+ messages in thread
From: Benny Halevy @ 2010-06-15 19:51 UTC (permalink / raw)
To: Fred Isaman; +Cc: linux-nfs
On Jun. 15, 2010, 1:01 -0400, Fred Isaman <iisaman@netapp.com> wrote:
> Setting this correctly also simplifies the call to layout_return.
>
> Signed-off-by: Fred Isaman <iisaman@netapp.com>
Merged at pnfs-all-2.6.35-rc3-2010-06-15
Thanks!
Benny
> ---
> fs/nfs/pnfs.c | 11 +++--------
> 1 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> index edffee3..56d2932 100644
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -731,7 +731,6 @@ pnfs_return_layout_barrier(struct nfs_inode *nfsi,
>
> static int
> return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
> - const nfs4_stateid *stateid, /* optional */
> enum pnfs_layoutreturn_type type, struct pnfs_layout_type *lo,
> bool wait)
> {
> @@ -755,10 +754,7 @@ return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
> lrp->args.lseg = *range;
> lrp->args.inode = ino;
> lrp->lo = lo;
> - if (stateid)
> - lrp->args.stateid = *stateid;
> - else if (lo)
> - pnfs_get_layout_stateid(&lrp->args.stateid, lo);
> + pnfs_get_layout_stateid(&lrp->args.stateid, lo);
>
> status = pnfs4_proc_layoutreturn(lrp, wait);
> out:
> @@ -830,9 +826,8 @@ _pnfs_return_layout(struct inode *ino, struct nfs4_pnfs_layout_segment *range,
> }
> }
>
> - if (stateid && wait)
> - status = return_layout(ino, &arg, stateid, type,
> - lo, wait);
> + if (!stateid)
> + status = return_layout(ino, &arg, type, lo, wait);
> else
> pnfs_layout_release(lo, &arg);
> }
--
Benny Halevy
Software Architect
Panasas, Inc.
bhalevy@panasas.com
Tel/Fax: +972-3-647-8340
Mobile: +972-54-802-8340
Panasas: The Leader in Parallel Storage
www.panasas.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-15 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 5:01 [PATCH 1/1] pnfs-submit: test for sending LAYOUTRETURN was reversed Fred Isaman
2010-06-15 19:51 ` Benny Halevy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox