* [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts()
@ 2019-08-19 21:39 ira.weiny
2019-08-19 23:10 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: ira.weiny @ 2019-08-19 21:39 UTC (permalink / raw)
To: Darrick J. Wong, linux-xfs; +Cc: linux-kernel, Ira Weiny
From: Ira Weiny <ira.weiny@intel.com>
The parens used in the while loop would result in error being assigned
the value 1 rather than the intended errno value.
This is required to return -ETXTBSY from follow on break_layout()
changes.
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
---
fs/xfs/xfs_pnfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
index 0c954cad7449..a339bd5fa260 100644
--- a/fs/xfs/xfs_pnfs.c
+++ b/fs/xfs/xfs_pnfs.c
@@ -32,7 +32,7 @@ xfs_break_leased_layouts(
struct xfs_inode *ip = XFS_I(inode);
int error;
- while ((error = break_layout(inode, false) == -EWOULDBLOCK)) {
+ while ((error = break_layout(inode, false)) == -EWOULDBLOCK) {
xfs_iunlock(ip, *iolock);
*did_unlock = true;
error = break_layout(inode, true);
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts()
2019-08-19 21:39 [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts() ira.weiny
@ 2019-08-19 23:10 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2019-08-19 23:10 UTC (permalink / raw)
To: ira.weiny; +Cc: linux-xfs, linux-kernel
On Mon, Aug 19, 2019 at 02:39:18PM -0700, ira.weiny@intel.com wrote:
> From: Ira Weiny <ira.weiny@intel.com>
>
> The parens used in the while loop would result in error being assigned
> the value 1 rather than the intended errno value.
>
> This is required to return -ETXTBSY from follow on break_layout()
> changes.
>
> Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Doh.
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_pnfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c
> index 0c954cad7449..a339bd5fa260 100644
> --- a/fs/xfs/xfs_pnfs.c
> +++ b/fs/xfs/xfs_pnfs.c
> @@ -32,7 +32,7 @@ xfs_break_leased_layouts(
> struct xfs_inode *ip = XFS_I(inode);
> int error;
>
> - while ((error = break_layout(inode, false) == -EWOULDBLOCK)) {
> + while ((error = break_layout(inode, false)) == -EWOULDBLOCK) {
> xfs_iunlock(ip, *iolock);
> *did_unlock = true;
> error = break_layout(inode, true);
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-08-19 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-19 21:39 [PATCH] fs/xfs: Fix return code of xfs_break_leased_layouts() ira.weiny
2019-08-19 23:10 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®