瀏覽代碼

NTFS: Use i_size_read() in fs/ntfs/file.c::ntfs_file_open().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Anton Altaparmakov 20 年之前
父節點
當前提交
d4b9ba7bf6
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      fs/ntfs/ChangeLog
  2. 1 1
      fs/ntfs/file.c

+ 1 - 0
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.
 

+ 1 - 1
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);