[Devel] [PATCH RHEL7 COMMIT] ve/aio: Kill ve_aio_set_tail()

Konstantin Khorenko khorenko at virtuozzo.com
Wed May 11 08:08:58 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.18
------>
commit 756fdd0f52e87004a7a47690721c7ce73fdd11aa
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Wed May 11 19:08:58 2016 +0400

    ve/aio: Kill ve_aio_set_tail()
    
    Since tail is restored using submitting requests to write in /dev/null,
    we do not need this interface anymore.
    
    https://jira.sw.ru/browse/PSBM-42488
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 fs/aio.c            | 30 ------------------------------
 include/linux/aio.h |  1 -
 2 files changed, 31 deletions(-)

diff --git a/fs/aio.c b/fs/aio.c
index ce23166..2de0735 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1849,33 +1849,6 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
 }
 
 #ifdef CONFIG_VE
-static int ve_aio_set_tail(struct kioctx *ctx, unsigned tail)
-{
-	struct aio_ring *ring;
-	int ret;
-
-	if (!get_exec_env()->is_pseudosuper)
-		return -EACCES;
-
-	mutex_lock(&ctx->ring_lock);
-	spin_lock_irq(&ctx->completion_lock);
-
-	ret = -E2BIG;
-	if (tail >= ctx->nr_events)
-		goto out;
-
-	ctx->tail = tail;
-
-	ring = kmap_atomic(ctx->ring_pages[0]);
-	ring->tail = tail;
-	kunmap_atomic(ring);
-	ret = 0;
-out:
-	spin_unlock_irq(&ctx->completion_lock);
-	mutex_unlock(&ctx->ring_lock);
-	return ret;
-}
-
 static bool has_reqs_active(struct kioctx *ctx)
 {
 	unsigned long flags;
@@ -1911,9 +1884,6 @@ int ve_aio_ioctl(struct task_struct *task, unsigned int cmd, unsigned long arg)
 		return -ESRCH;
 
 	switch (cmd) {
-		case VE_AIO_IOC_SET_TAIL:
-			ret = ve_aio_set_tail(ioctx, karg.val);
-			break;
 		case VE_AIO_IOC_WAIT_ACTIVE:
 			ret = ve_aio_wait_inflight_reqs(ioctx);
 			break;
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 371fb82..238cb70 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -22,7 +22,6 @@ struct ve_ioc_arg
 	unsigned	val;
 };
 
-#define VE_AIO_IOC_SET_TAIL	_IOW('a',  0, struct ve_ioc_arg)
 #define VE_AIO_IOC_WAIT_ACTIVE	_IOW('a',  1, struct ve_ioc_arg)
 
 /*


More information about the Devel mailing list