summaryrefslogtreecommitdiffstats
path: root/mm/truncate.c
diff options
context:
space:
mode:
authorCesar Eduardo Barros <cesarb@cesarb.net>2011-03-23 00:33:28 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 01:44:07 +0100
commit5de771e41f0fc2243c39585357b73f0ff757b280 (patch)
treea807bb46f4334b6697c0dba7dc80075e8dccae5f /mm/truncate.c
parentsys_swapon: simplify error flow in claim_swapfile() (diff)
downloadlinux-5de771e41f0fc2243c39585357b73f0ff757b280.tar.xz
linux-5de771e41f0fc2243c39585357b73f0ff757b280.zip
sys_swapon: move setting of swapfilepages near use
There is no reason I can see to read inode->i_size long before it is needed. Move its read to just before it is needed, to reduce the variable lifetime. Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net> Tested-by: Eric B Munson <emunson@mgebm.net> Acked-by: Eric B Munson <emunson@mgebm.net> Reviewed-by: Jesper Juhl <jj@chaosbits.net> Reviewed-by: Pekka Enberg <penberg@kernel.org> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/truncate.c')
0 files changed, 0 insertions, 0 deletions