linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Adam Litke <agl@us.ibm.com>
To: akpm@osdl.org
Cc: William Lee Irwin III <wli@holomorphy.com>, linux-mm@kvack.org
Subject: [PATCH] hugetlb: Remove spurious i_blocks accounting check
Date: Fri, 14 Oct 2005 09:45:10 -0500	[thread overview]
Message-ID: <1129301110.8797.32.camel@localhost.localdomain> (raw)

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>

                 reply	other threads:[~2005-10-14 14:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1129301110.8797.32.camel@localhost.localdomain \
    --to=agl@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-mm@kvack.org \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox