X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=mm%2Ftruncate.c;h=d64296be00d39e5c66199e94269f3b8f5ba0bf64;hb=2990821d0e38d2bfc556ad39d709b5f8a83c2ebd;hp=3c2d5ddfa0d49f3cf31449e214d8fbd50e92ad08;hpb=0f54088aac3fc744cae0cbc4f021fc377e48a00c;p=mv-sheeva.git diff --git a/mm/truncate.c b/mm/truncate.c index 3c2d5ddfa0d..d64296be00d 100644 --- a/mm/truncate.c +++ b/mm/truncate.c @@ -225,6 +225,7 @@ void truncate_inode_pages_range(struct address_space *mapping, next = start; while (next <= end && pagevec_lookup(&pvec, mapping, next, PAGEVEC_SIZE)) { + mem_cgroup_uncharge_start(); for (i = 0; i < pagevec_count(&pvec); i++) { struct page *page = pvec.pages[i]; pgoff_t page_index = page->index; @@ -247,6 +248,7 @@ void truncate_inode_pages_range(struct address_space *mapping, unlock_page(page); } pagevec_release(&pvec); + mem_cgroup_uncharge_end(); cond_resched(); } @@ -549,13 +551,12 @@ EXPORT_SYMBOL(truncate_pagecache); * @inode: inode * @newsize: new file size * - * truncate_setsize updastes i_size update and performs pagecache - * truncation (if necessary) for a file size updates. It will be - * typically be called from the filesystem's setattr function when - * ATTR_SIZE is passed in. + * truncate_setsize updates i_size and performs pagecache truncation (if + * necessary) to @newsize. It will be typically be called from the filesystem's + * setattr function when ATTR_SIZE is passed in. * - * Must be called with inode_mutex held and after all filesystem - * specific block truncation has been performed. + * Must be called with inode_mutex held and before all filesystem specific + * block truncation has been performed. */ void truncate_setsize(struct inode *inode, loff_t newsize) {