aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-26 17:21:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 19:52:09 -0400
commit0116651c85e671a693dd2f56e95dd651f746c973 (patch)
treed09f274105bc756b5fbd09dcb55302c0191e7e74
parent68da336a14e16c2de95e987f3200995b707d7038 (diff)
mm: remove temporary variable on generic_file_direct_write()
'end' shadows earlier one and is not necessary at all. Remove it and use 'pos' instead. This removes following sparse warnings: mm/filemap.c:2180:24: warning: symbol 'end' shadows an earlier one mm/filemap.c:2132:25: originally declared here Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/filemap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 33f81252a744..75572b5f2374 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2193,12 +2193,12 @@ generic_file_direct_write(struct kiocb *iocb, const struct iovec *iov,
2193 } 2193 }
2194 2194
2195 if (written > 0) { 2195 if (written > 0) {
2196 loff_t end = pos + written; 2196 pos += written;
2197 if (end > i_size_read(inode) && !S_ISBLK(inode->i_mode)) { 2197 if (pos > i_size_read(inode) && !S_ISBLK(inode->i_mode)) {
2198 i_size_write(inode, end); 2198 i_size_write(inode, pos);
2199 mark_inode_dirty(inode); 2199 mark_inode_dirty(inode);
2200 } 2200 }
2201 *ppos = end; 2201 *ppos = pos;
2202 } 2202 }
2203out: 2203out:
2204 return written; 2204 return written;