diff mbox

NFSD: Use correct reply size calculating function

Message ID 5505A6AF.7040608@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kinglong Mee March 15, 2015, 3:35 p.m. UTC
ALLOCATE/DEALLOCATE only reply one status value to client,
so, using nfsd4_only_status_rsize for reply size calculating.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfs4proc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Schumaker, Anna March 16, 2015, 3:03 p.m. UTC | #1
On 03/15/2015 11:35 AM, Kinglong Mee wrote:
> ALLOCATE/DEALLOCATE only reply one status value to client,
> so, using nfsd4_only_status_rsize for reply size calculating.

Makes sense to me.  Thanks for catching this!

> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/nfs4proc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 92b9d97..4449359 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -2282,13 +2282,13 @@ static struct nfsd4_operation nfsd4_ops[] = {
>  		.op_func = (nfsd4op_func)nfsd4_allocate,
>  		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
>  		.op_name = "OP_ALLOCATE",
> -		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
> +		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
>  	},
>  	[OP_DEALLOCATE] = {
>  		.op_func = (nfsd4op_func)nfsd4_deallocate,
>  		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
>  		.op_name = "OP_DEALLOCATE",
> -		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
> +		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
>  	},
>  	[OP_SEEK] = {
>  		.op_func = (nfsd4op_func)nfsd4_seek,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
J. Bruce Fields March 20, 2015, 8:24 p.m. UTC | #2
On Sun, Mar 15, 2015 at 11:35:11PM +0800, Kinglong Mee wrote:
> ALLOCATE/DEALLOCATE only reply one status value to client,
> so, using nfsd4_only_status_rsize for reply size calculating.

Thanks!  Applying for 4.1.  (It's a bug, but I don't see an obvious
serious impact, so I'm assuming it doesn't need to go to 4.0 and stable.
Tell me if I've overlooked something.)

--b.

> 
> Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
> ---
>  fs/nfsd/nfs4proc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 92b9d97..4449359 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -2282,13 +2282,13 @@ static struct nfsd4_operation nfsd4_ops[] = {
>  		.op_func = (nfsd4op_func)nfsd4_allocate,
>  		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
>  		.op_name = "OP_ALLOCATE",
> -		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
> +		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
>  	},
>  	[OP_DEALLOCATE] = {
>  		.op_func = (nfsd4op_func)nfsd4_deallocate,
>  		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
>  		.op_name = "OP_DEALLOCATE",
> -		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
> +		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
>  	},
>  	[OP_SEEK] = {
>  		.op_func = (nfsd4op_func)nfsd4_seek,
> -- 
> 2.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 92b9d97..4449359 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -2282,13 +2282,13 @@  static struct nfsd4_operation nfsd4_ops[] = {
 		.op_func = (nfsd4op_func)nfsd4_allocate,
 		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
 		.op_name = "OP_ALLOCATE",
-		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
+		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
 	},
 	[OP_DEALLOCATE] = {
 		.op_func = (nfsd4op_func)nfsd4_deallocate,
 		.op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME,
 		.op_name = "OP_DEALLOCATE",
-		.op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize,
+		.op_rsize_bop = (nfsd4op_rsize)nfsd4_only_status_rsize,
 	},
 	[OP_SEEK] = {
 		.op_func = (nfsd4op_func)nfsd4_seek,