[Devel] [PATCH rh7] fs/aio-nr: fix decrement of aio-nr
Kirill Tkhai
ktkhai at virtuozzo.com
Fri May 27 08:35:53 PDT 2016
On 27.05.2016 18:35, Andrey Ryabinin wrote:
> Patch 'fs/aio: show real number of aio events in fs.aio-nr sysctl'
> changed only incrementing of fs.aio-nr counter. It failed to update
> decrement path which leads to constant growing of fs.aio-nr value.
>
> Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
Acked-by: Kirill Tkhai <ktkhai at virtuozzo.com>
> ---
> fs/aio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/aio.c b/fs/aio.c
> index 0f00aa0..96f30d4 100644
> --- a/fs/aio.c
> +++ b/fs/aio.c
> @@ -710,8 +710,8 @@ static int kill_ioctx(struct mm_struct *mm, struct kioctx *ctx,
> * could tell).
> */
> spin_lock(&ve->aio_nr_lock);
> - BUG_ON(ve->aio_nr - ctx->max_reqs > ve->aio_nr);
> - ve->aio_nr -= ctx->max_reqs;
> + BUG_ON(ve->aio_nr - ctx->nr_events > ve->aio_nr);
> + ve->aio_nr -= ctx->nr_events;
> spin_unlock(&ve->aio_nr_lock);
>
> if (ctx->mmap_size)
>
More information about the Devel
mailing list