summaryrefslogtreecommitdiff
path: root/extra/quota-tools/system_inodes.diff
blob: 94f4d66da0afbe69b4d39b91fbb7b1dee13f70b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Description: Do not count system inodes into quota for ext[234]
# Author: Jan Kara

--- quota/quotacheck.c	2010-02-18 09:44:10.000000000 +0100
+++ quota-tools//quotacheck.c	2010-05-22 16:47:53.000000000 +0200
@@ -455,8 +455,10 @@
 		return -1;
 	}
 
-	while ((long)i_num) {
-		if (inode.i_links_count) {
+	while (i_num) {
+		if ((i_num == EXT2_ROOT_INO ||
+		     i_num >= EXT2_FIRST_INO(fs->super)) &&
+		    inode.i_links_count) {
 			debug(FL_DEBUG, _("Found i_num %ld, blocks %ld\n"), (long)i_num, (long)inode.i_blocks);
 			if (flags & FL_VERBOSE)
 				blit(NULL);