lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 May 2012 22:59:04 +0800
From:	jeff.liu@...cle.com
To:	containers@...ts.linux-foundation.org
Cc:	cgroups@...r.kernel.org, jack@...e.cz, glommer@...allels.com,
	daniel.lezcano@...e.fr, tytso@....edu, bpm@....com,
	chris.mason@...cle.com, hch@...radead.org,
	christopher.jones@...cle.com, david@...morbit.com,
	tinguely@....com, tm@....ma, linux-ext4@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, Jie Liu <jeff.liu@...cle.com>
Subject: [PATCH 10/12] container quota: bill container inodes alloc/free on ext4.

Bill up container inodes allocation and free on ext4.

Signed-off-by: Jie Liu <jeff.liu@...cle.com>
---
 fs/ext4/ialloc.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c
index 9f9acac..510fa41 100644
--- a/fs/ext4/ialloc.c
+++ b/fs/ext4/ialloc.c
@@ -31,6 +31,8 @@
 
 #include <trace/events/ext4.h>
 
+#include "../ns_quotaops.h"
+
 /*
  * ialloc.c contains the inodes allocation and deallocation routines
  */
@@ -233,6 +235,7 @@ void ext4_free_inode(handle_t *handle, struct inode *inode)
 	dquot_initialize(inode);
 	ext4_xattr_delete_inode(handle, inode);
 	dquot_free_inode(inode);
+	ns_dquot_free_inode(inode);
 	dquot_drop(inode);
 
 	is_directory = S_ISDIR(inode->i_mode);
@@ -861,6 +864,10 @@ got:
 	if (err)
 		goto fail_drop;
 
+	err = ns_dquot_alloc_inode(inode);
+	if (err)
+		goto fail_drop;
+
 	err = ext4_init_acl(handle, inode, dir);
 	if (err)
 		goto fail_free_drop;
@@ -902,6 +909,7 @@ really_out:
 
 fail_free_drop:
 	dquot_free_inode(inode);
+	ns_dquot_free_inode(inode);
 
 fail_drop:
 	dquot_drop(inode);
-- 
1.7.9

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ