* [PATCH] nfsd: constify write_op[]
@ 2018-07-17 18:01 Eric Biggers
2018-08-01 15:31 ` J . Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Eric Biggers @ 2018-07-17 18:01 UTC (permalink / raw)
To: linux-nfs, J . Bruce Fields, Jeff Layton; +Cc: Eric Biggers
From: Eric Biggers <ebiggers@google.com>
write_op[] is never modified, so make it 'const'.
Signed-off-by: Eric Biggers <ebiggers@google.com>
---
fs/nfsd/nfsctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 2c46451c7d60..19aa4ded2590 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -73,7 +73,7 @@ static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);
static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size);
#endif
-static ssize_t (*write_op[])(struct file *, char *, size_t) = {
+static ssize_t (*const write_op[])(struct file *, char *, size_t) = {
[NFSD_Fh] = write_filehandle,
[NFSD_FO_UnlockIP] = write_unlock_ip,
[NFSD_FO_UnlockFS] = write_unlock_fs,
--
2.18.0.203.gfac676dfb9-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nfsd: constify write_op[]
2018-07-17 18:01 [PATCH] nfsd: constify write_op[] Eric Biggers
@ 2018-08-01 15:31 ` J . Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J . Bruce Fields @ 2018-08-01 15:31 UTC (permalink / raw)
To: Eric Biggers; +Cc: linux-nfs, Jeff Layton, Eric Biggers
On Tue, Jul 17, 2018 at 11:01:25AM -0700, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@google.com>
>
> write_op[] is never modified, so make it 'const'.
Thanks, applying for 2.19.--b.
>
> Signed-off-by: Eric Biggers <ebiggers@google.com>
> ---
> fs/nfsd/nfsctl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
> index 2c46451c7d60..19aa4ded2590 100644
> --- a/fs/nfsd/nfsctl.c
> +++ b/fs/nfsd/nfsctl.c
> @@ -73,7 +73,7 @@ static ssize_t write_recoverydir(struct file *file, char *buf, size_t size);
> static ssize_t write_v4_end_grace(struct file *file, char *buf, size_t size);
> #endif
>
> -static ssize_t (*write_op[])(struct file *, char *, size_t) = {
> +static ssize_t (*const write_op[])(struct file *, char *, size_t) = {
> [NFSD_Fh] = write_filehandle,
> [NFSD_FO_UnlockIP] = write_unlock_ip,
> [NFSD_FO_UnlockFS] = write_unlock_fs,
> --
> 2.18.0.203.gfac676dfb9-goog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-01 17:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 18:01 [PATCH] nfsd: constify write_op[] Eric Biggers
2018-08-01 15:31 ` J . Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).