All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH]Fix return code for mkdir calls
  2010-08-20  8:51 [PATCH]Fix return code for mkdir calls Ciju Rajan K
@ 2010-08-20  8:51 ` KAMEZAWA Hiroyuki
  2010-08-23  8:54 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: KAMEZAWA Hiroyuki @ 2010-08-20  8:51 UTC (permalink / raw)
  To: Ciju Rajan K
  Cc: linux-kernel, Jens Axobe, Vivek Goyal, Daniel P. Berrange,
	Munehiro Ikeda, Ryo Tsuruta, taka, Andrea Righi, Andrew Morton,
	Balbir Singh, Bharata B Rao

On Fri, 20 Aug 2010 14:21:53 +0530
Ciju Rajan K <ciju@linux.vnet.ibm.com> wrote:

> Hi,
> 
> This patch fixes the return value when the cgroup hierarchy for blkio 
> control groups is deeper than two levels. Right now EINVAL is returned. 
> This patch replaces EINVAL with more appropriate EPERM to align with 
> mkdir system call return values. This was discussed between Vivek and 
> Daniel sometime back. Please consider this patch for inclusion in 2.6.36.
> 
> Thanks
> Ciju
> 
Thank you!

Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH]Fix return code for mkdir calls
@ 2010-08-20  8:51 Ciju Rajan K
  2010-08-20  8:51 ` KAMEZAWA Hiroyuki
  2010-08-23  8:54 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Ciju Rajan K @ 2010-08-20  8:51 UTC (permalink / raw)
  To: linux-kernel, Jens Axobe, Vivek Goyal, Daniel P. Berrange
  Cc: Munehiro Ikeda, Ryo Tsuruta, taka, KAMEZAWA Hiroyuki,
	Andrea Righi, Andrew Morton, Balbir Singh, Bharata B Rao,
	Ciju Rajan K

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

Hi,

This patch fixes the return value when the cgroup hierarchy for blkio 
control groups is deeper than two levels. Right now EINVAL is returned. 
This patch replaces EINVAL with more appropriate EPERM to align with 
mkdir system call return values. This was discussed between Vivek and 
Daniel sometime back. Please consider this patch for inclusion in 2.6.36.

Thanks
Ciju


[-- Attachment #2: blkio-Fix-the-return-code.patch --]
[-- Type: text/plain, Size: 1056 bytes --]

>From bd2b65775a5b187f7c15c2b6d88f47cd24fb9c4e Mon Sep 17 00:00:00 2001
From: Ciju Rajan K <ciju@linux.vnet.ibm.com>
Date: Fri, 20 Aug 2010 12:02:45 +0530
Subject: blkio: Fix return code for mkdir calls

If the cgroup hierarchy for blkio control groups is deeper than two
levels, kernel should not allow the creation of further levels. mkdir
system call does not except EINVAL as a return value. This patch
replaces EINVAL with more appropriate EPERM

Signed-off-by: Ciju Rajan K <ciju@linux.vnet.ibm.com>
---
 block/blk-cgroup.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index a680964..2fef1ef 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -966,7 +966,7 @@ blkiocg_create(struct cgroup_subsys *subsys, struct cgroup *cgroup)
 
 	/* Currently we do not support hierarchy deeper than two level (0,1) */
 	if (parent != cgroup->top_cgroup)
-		return ERR_PTR(-EINVAL);
+		return ERR_PTR(-EPERM);
 
 	blkcg = kzalloc(sizeof(*blkcg), GFP_KERNEL);
 	if (!blkcg)
-- 
1.6.0.6



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH]Fix return code for mkdir calls
  2010-08-20  8:51 [PATCH]Fix return code for mkdir calls Ciju Rajan K
  2010-08-20  8:51 ` KAMEZAWA Hiroyuki
@ 2010-08-23  8:54 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2010-08-23  8:54 UTC (permalink / raw)
  To: Ciju Rajan K
  Cc: linux-kernel, Vivek Goyal, Daniel P. Berrange, Munehiro Ikeda,
	Ryo Tsuruta, taka, KAMEZAWA Hiroyuki, Andrea Righi,
	Andrew Morton, Balbir Singh, Bharata B Rao

On 2010-08-20 10:51, Ciju Rajan K wrote:
> Hi,
> 
> This patch fixes the return value when the cgroup hierarchy for blkio 
> control groups is deeper than two levels. Right now EINVAL is returned. 
> This patch replaces EINVAL with more appropriate EPERM to align with 
> mkdir system call return values. This was discussed between Vivek and 
> Daniel sometime back. Please consider this patch for inclusion in 2.6.36.
> 
> Thanks
> Ciju
> 

Thanks, applied.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-23  8:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-20  8:51 [PATCH]Fix return code for mkdir calls Ciju Rajan K
2010-08-20  8:51 ` KAMEZAWA Hiroyuki
2010-08-23  8:54 ` Jens Axboe

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.