linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hugetlb: Remove spurious i_blocks accounting check
@ 2005-10-14 14:45 Adam Litke
  0 siblings, 0 replies; only message in thread
From: Adam Litke @ 2005-10-14 14:45 UTC (permalink / raw)
  To: akpm; +Cc: William Lee Irwin III, linux-mm

Fix up hugetlb-simple-overcommit-check.patch in -mm tree

Pft.  This bit of code that Bill Irwin pointed out snuck in here from another
accounting approach I was investigating.

Signed-off-by: Adam Litke <agl@us.ibm.com>

 inode.c |    9 ---------
 1 files changed, 9 deletions(-)
diff -upN reference/fs/hugetlbfs/inode.c current/fs/hugetlbfs/inode.c
--- reference/fs/hugetlbfs/inode.c
+++ current/fs/hugetlbfs/inode.c
@@ -75,14 +75,6 @@ huge_pages_needed(struct address_space *
 	pgoff_t endpg = next + ((end - start) >> PAGE_SHIFT);
 	struct inode *inode = vma->vm_file->f_dentry->d_inode;
 
-	/*
-	 * Shared memory segments are accounted for at shget time,
-	 * not at shmat (when the mapping is actually created) so 
-	 * check here if the memory has already been accounted for.
-	 */
-	if (inode->i_blocks != 0)
-		return 0;
-
 	pagevec_init(&pvec, 0);
 	while (next < endpg) {
 		if (!pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE))
@@ -844,7 +836,6 @@ struct file *hugetlb_zero_setup(size_t s
 	d_instantiate(dentry, inode);
 	inode->i_size = size;
 	inode->i_nlink = 0;
-	inode->i_blocks = 1;
 	file->f_vfsmnt = mntget(hugetlbfs_vfsmount);
 	file->f_dentry = dentry;
 	file->f_mapping = inode->i_mapping;

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-10-14 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-14 14:45 [PATCH] hugetlb: Remove spurious i_blocks accounting check Adam Litke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox