Messages in this thread Patch in this message | | | From | Jeff Moyer <> | Date | Tue, 22 Mar 2005 16:52:54 -0500 | Subject | unused 'size' assignment in filemap_nopage |
| |
filemap_nopage has the following code:
retry_all: size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT; if (pgoff >= size) goto outside_data_content;
/* If we don't want any read-ahead, don't bother */ if (VM_RandomReadHint(area)) goto no_cached_page;
/* * The "size" of the file, as far as mmap is concerned, isn't bigger * than the mapping */ if (size > endoff) size = endoff;
After this, size is not referenced. So, either this potential reassignment of size is superfluous, or we are missing some other code later on in the function. If it is the former, I've attached a patch which will remove the code.
Thanks,
Jeff
--- linux-2.6.12-rc1/mm/filemap.c.orig 2005-03-22 16:28:01.429426880 -0500 +++ linux-2.6.12-rc1/mm/filemap.c 2005-03-22 16:29:22.564092536 -0500 @@ -1191,13 +1191,6 @@ retry_all: goto no_cached_page; /* - * The "size" of the file, as far as mmap is concerned, isn't bigger - * than the mapping - */ - if (size > endoff) - size = endoff; - - /* * The readahead code wants to be told about each and every page * so it can build and shrink its windows appropriately * - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |