From: Anton Altaparmakov Date: Wed, 17 Nov 2004 15:45:08 +0000 (+0000) Subject: NTFS: Use i_size_read() in fs/ntfs/file.c::ntfs_file_open(). X-Git-Tag: v2.6.13-rc4~89^2~56 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4b9ba7bf6f38cff55b5d95a0db7dd91311ce20a;p=linux-2.6 NTFS: Use i_size_read() in fs/ntfs/file.c::ntfs_file_open(). Signed-off-by: Anton Altaparmakov --- diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index ff0d9b132d..6d2a99c13d 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog @@ -33,6 +33,7 @@ ToDo/Notes: - Use i_size_read() in fs/ntfs/logfile.c::ntfs_{check,empty}_logfile(). - Use i_size_read() once and then use the cached value in fs/ntfs/lcnalloc.c::ntfs_cluster_alloc(). + - Use i_size_read() in fs/ntfs/file.c::ntfs_file_open(). 2.1.22 - Many bug and race fixes and error handling improvements. diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index db8713ea0d..e0f530ce6b 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c @@ -47,7 +47,7 @@ static int ntfs_file_open(struct inode *vi, struct file *filp) { if (sizeof(unsigned long) < 8) { - if (vi->i_size > MAX_LFS_FILESIZE) + if (i_size_read(vi) > MAX_LFS_FILESIZE) return -EFBIG; } return generic_file_open(vi, filp);