All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 3/6] NFSD: Move documenting comment for nfsd4_process_open2()
Date: Fri, 29 Apr 2022 10:53:49 -0400	[thread overview]
Message-ID: <165124402926.1060.11916783684271494269.stgit@bazille.1015granger.net> (raw)
In-Reply-To: <165124376329.1060.17013198516228928515.stgit@bazille.1015granger.net>

Clean up nfsd4_open() by converting a large comment at the only
call site for nfsd4_process_open2() to a kerneldoc comment in
front of that function.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 fs/nfsd/nfs4proc.c  |    6 +-----
 fs/nfsd/nfs4state.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 05ec878b005d..9dbce52f0f33 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -628,11 +628,7 @@ nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
 		status = nfserr_inval;
 		goto out;
 	}
-	/*
-	 * nfsd4_process_open2() does the actual opening of the file.  If
-	 * successful, it (1) truncates the file if open->op_truncate was
-	 * set, (2) sets open->op_stateid, (3) sets open->op_delegation.
-	 */
+
 	status = nfsd4_process_open2(rqstp, resfh, open);
 	WARN(status && open->op_created,
 	     "nfsd4_process_open2 failed to open newly-created file! status=%u\n",
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e7c28ddf2538..899bcf9cd612 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5332,6 +5332,18 @@ static void nfsd4_deleg_xgrade_none_ext(struct nfsd4_open *open,
 	 */
 }
 
+/**
+ * nfsd4_process_open2 - finish open processing
+ * @rqstp: the RPC transaction being executed
+ * @current_fh: NFSv4 COMPOUND's current filehandle
+ * @open: OPEN arguments
+ *
+ * If successful, (1) truncate the file if open->op_truncate was
+ * set, (2) set open->op_stateid, (3) set open->op_delegation.
+ *
+ * Returns %nfs_ok on success; otherwise an nfs4stat value in
+ * network byte order is returned.
+ */
 __be32
 nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open)
 {



  parent reply	other threads:[~2022-04-29 14:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-29 14:53 [PATCH 0/6] Minor NFSD fixes and clean-ups for 5.19 Chuck Lever
2022-04-29 14:53 ` [PATCH 1/6] NFSD: Remove dprintk call sites from tail of nfsd4_open() Chuck Lever
2022-04-29 14:53 ` [PATCH 2/6] NFSD: Fix whitespace Chuck Lever
2022-04-29 14:53 ` Chuck Lever [this message]
2022-04-29 14:53 ` [PATCH 4/6] NFSD: Trace filecache opens Chuck Lever
2022-04-29 14:54 ` [PATCH 5/6] NFSD: Clean up the show_nf_flags() macro Chuck Lever
2022-04-29 14:54 ` [PATCH 6/6] SUNRPC: Use RMW bitops in single-threaded hot paths Chuck Lever
2022-04-29 14:55 ` [PATCH 0/6] Minor NFSD fixes and clean-ups for 5.19 Chuck Lever III

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=165124402926.1060.11916783684271494269.stgit@bazille.1015granger.net \
    --to=chuck.lever@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --subject='Re: [PATCH 3/6] NFSD: Move documenting comment for nfsd4_process_open2()' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.