From a9adfbf41963e2dc933f9046c874d42e07d23294 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Wed, 14 Nov 2007 10:25:40 +0000 Subject: [PATCH] revert-mm-fix-blkdev-size-calculation-in-generic_write_checks Signed-off-by: Andrew Morton --- mm/filemap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index 6dd28b2a0be7..8e54d9e24137 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1867,11 +1867,9 @@ inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, i } else { #ifdef CONFIG_BLOCK loff_t isize; - unsigned int blksize; if (bdev_read_only(I_BDEV(inode))) return -EPERM; - blksize = block_size(I_BDEV(inode)); - isize = i_size_read(inode) & ~(blksize - 1); + isize = i_size_read(inode); if (*pos >= isize) { if (*count || *pos > isize) return -ENOSPC; -- 2.11.4.GIT