fs/fuse kio_pcs: some cleanup ireq_on_error_()

Submitted by Pavel Butsykin on June 6, 2018, 5:22 p.m.

Details

Message ID 20180606172237.9704-1-pbutsykin@virtuozzo.com
State New
Series "fs/fuse kio_pcs: some cleanup ireq_on_error_()"
Headers show

Commit Message

Pavel Butsykin June 6, 2018, 5:22 p.m.
Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_cluster.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
index 24ec8a5f39a3..5441a357b87d 100644
--- a/fs/fuse/kio/pcs/pcs_cluster.c
+++ b/fs/fuse/kio/pcs/pcs_cluster.c
@@ -486,11 +486,8 @@  static void ireq_on_error_(struct pcs_int_request *ireq)
 	case PCS_ERR_LEASE_EXPIRED:
 	case PCS_ERR_INTEGRITY_FAIL: {
 		/* TODO:  tag ireq->dentry with EIO here */
-		goto fatal;
 	}
 	case PCS_ERR_CSD_LACKING:
-		goto fatal;
-		break;
 	case PCS_ERR_INV_PARAMS:
 	case PCS_ERR_NOT_FOUND:
 	case PCS_ERR_NON_EMPTY_DIR:
@@ -498,9 +495,9 @@  static void ireq_on_error_(struct pcs_int_request *ireq)
 	case PCS_ERR_IS_DIR:
 	case PCS_ERR_NO_STORAGE:
 	case PCS_ERR_UNAVAIL:
-fatal:
-		printk(KERN_INFO "%s fatal error:%d nodeid:%llu", __func__,
-		       ireq->error.value, ireq->dentry->inode->nodeid);
+		pr_info("%s fatal error:%d ireq->type:%d nodeid:%llu",
+			__func__, ireq->error.value, ireq->type,
+			ireq->dentry->inode->nodeid);
 		ireq->flags |= IREQ_F_FATAL;
 		break;
 	case PCS_ERR_LEASE_CONFLICT:
@@ -508,7 +505,6 @@  fatal:
 		break;
 	default:
 		break;
-		;
 	}
 }
 

Comments

Kirill Tkhai June 7, 2018, 8:33 a.m.
On 06.06.2018 20:22, Pavel Butsykin wrote:
> Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>

> ---
>  fs/fuse/kio/pcs/pcs_cluster.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/fuse/kio/pcs/pcs_cluster.c b/fs/fuse/kio/pcs/pcs_cluster.c
> index 24ec8a5f39a3..5441a357b87d 100644
> --- a/fs/fuse/kio/pcs/pcs_cluster.c
> +++ b/fs/fuse/kio/pcs/pcs_cluster.c
> @@ -486,11 +486,8 @@ static void ireq_on_error_(struct pcs_int_request *ireq)
>  	case PCS_ERR_LEASE_EXPIRED:
>  	case PCS_ERR_INTEGRITY_FAIL: {
>  		/* TODO:  tag ireq->dentry with EIO here */
> -		goto fatal;
>  	}
>  	case PCS_ERR_CSD_LACKING:
> -		goto fatal;
> -		break;
>  	case PCS_ERR_INV_PARAMS:
>  	case PCS_ERR_NOT_FOUND:
>  	case PCS_ERR_NON_EMPTY_DIR:
> @@ -498,9 +495,9 @@ static void ireq_on_error_(struct pcs_int_request *ireq)
>  	case PCS_ERR_IS_DIR:
>  	case PCS_ERR_NO_STORAGE:
>  	case PCS_ERR_UNAVAIL:
> -fatal:
> -		printk(KERN_INFO "%s fatal error:%d nodeid:%llu", __func__,
> -		       ireq->error.value, ireq->dentry->inode->nodeid);
> +		pr_info("%s fatal error:%d ireq->type:%d nodeid:%llu",
> +			__func__, ireq->error.value, ireq->type,
> +			ireq->dentry->inode->nodeid);
>  		ireq->flags |= IREQ_F_FATAL;
>  		break;
>  	case PCS_ERR_LEASE_CONFLICT:
> @@ -508,7 +505,6 @@ fatal:
>  		break;
>  	default:
>  		break;
> -		;
>  	}
>  }
>  
>