mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Miaohe Lin <linmiaohe@huawei.com>
Cc: Bruce Fields <bfields@fieldses.org>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfsd: Convert to use the preferred fallthrough macro
Date: Wed, 19 Aug 2020 08:53:40 -0400	[thread overview]
Message-ID: <3CDBC253-B211-48BC-B78C-E99DC45B4B03@oracle.com> (raw)
In-Reply-To: <20200819092658.35504-1-linmiaohe@huawei.com>



> On Aug 19, 2020, at 5:26 AM, Miaohe Lin <linmiaohe@huawei.com> wrote:
> 
> Convert the uses of fallthrough comments to fallthrough macro.

The patch description would be more helpful if it referenced the
commit that added the fallthrough macro to the kernel, or a
permanent mailing list link that described its appropriate usage.

Thanks!

> Signed-off-by: Hongxiang Lou <louhongxiang@huawei.com>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> fs/nfsd/nfs4callback.c | 2 +-
> fs/nfsd/nfs4proc.c     | 2 +-
> fs/nfsd/nfs4state.c    | 2 +-
> fs/nfsd/nfsfh.c        | 2 +-
> fs/nfsd/vfs.c          | 4 ++--
> 5 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 7fbe9840a03e..052be5bf9ef5 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -1119,7 +1119,7 @@ static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback
> 		break;
> 	case -ESERVERFAULT:
> 		++session->se_cb_seq_nr;
> -		/* Fall through */
> +		fallthrough;
> 	case 1:
> 	case -NFS4ERR_BADSESSION:
> 		nfsd4_mark_cb_fault(cb->cb_clp, cb->cb_seq_status);
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index a527da3d8052..eaf50eafa935 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -428,7 +428,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> 				goto out;
> 			open->op_openowner->oo_flags |= NFS4_OO_CONFIRMED;
> 			reclaim = true;
> -			/* fall through */
> +			fallthrough;
> 		case NFS4_OPEN_CLAIM_FH:
> 		case NFS4_OPEN_CLAIM_DELEG_CUR_FH:
> 			status = do_open_fhandle(rqstp, cstate, open);
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 81ed8e8bab3f..2f77f4b66cbc 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -3117,7 +3117,7 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> 		break;
> 	default:				/* checked by xdr code */
> 		WARN_ON_ONCE(1);
> -		/* fall through */
> +		fallthrough;
> 	case SP4_SSV:
> 		status = nfserr_encr_alg_unsupp;
> 		goto out_nolock;
> diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
> index 37bc8f5f4514..a0a8d27539ae 100644
> --- a/fs/nfsd/nfsfh.c
> +++ b/fs/nfsd/nfsfh.c
> @@ -469,7 +469,7 @@ static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp)
> 	case FSID_UUID16:
> 		if (!is_root_export(exp))
> 			return false;
> -		/* fall through */
> +		fallthrough;
> 	case FSID_UUID4_INUM:
> 	case FSID_UUID16_INUM:
> 		return exp->ex_uuid != NULL;
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 7d2933b85b65..aba5af9df328 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -1456,7 +1456,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
> 					*created = true;
> 				break;
> 			}
> -			/* fall through */
> +			fallthrough;
> 		case NFS4_CREATE_EXCLUSIVE4_1:
> 			if (   d_inode(dchild)->i_mtime.tv_sec == v_mtime
> 			    && d_inode(dchild)->i_atime.tv_sec == v_atime
> @@ -1465,7 +1465,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
> 					*created = true;
> 				goto set_attr;
> 			}
> -			/* fall through */
> +			fallthrough;
> 		case NFS3_CREATE_GUARDED:
> 			err = nfserr_exist;
> 		}
> -- 
> 2.19.1
> 

--
Chuck Lever




  reply	other threads:[~2020-08-19 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  9:26 Miaohe Lin
2020-08-19 12:53 ` Chuck Lever [this message]
2020-08-20  2:21 linmiaohe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CDBC253-B211-48BC-B78C-E99DC45B4B03@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=bfields@fieldses.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®