diff options
Diffstat (limited to 'fs/ntfs/file.c')
| -rw-r--r-- | fs/ntfs/file.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c index db8713ea0d27..be9fd1dd423d 100644 --- a/fs/ntfs/file.c +++ b/fs/ntfs/file.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * file.c - NTFS kernel file operations. Part of the Linux-NTFS project. | 2 | * file.c - NTFS kernel file operations. Part of the Linux-NTFS project. |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2001-2004 Anton Altaparmakov | 4 | * Copyright (c) 2001-2005 Anton Altaparmakov |
| 5 | * | 5 | * |
| 6 | * This program/include file is free software; you can redistribute it and/or | 6 | * This program/include file is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as published | 7 | * modify it under the terms of the GNU General Public License as published |
| @@ -47,7 +47,7 @@ | |||
| 47 | static int ntfs_file_open(struct inode *vi, struct file *filp) | 47 | static int ntfs_file_open(struct inode *vi, struct file *filp) |
| 48 | { | 48 | { |
| 49 | if (sizeof(unsigned long) < 8) { | 49 | if (sizeof(unsigned long) < 8) { |
| 50 | if (vi->i_size > MAX_LFS_FILESIZE) | 50 | if (i_size_read(vi) > MAX_LFS_FILESIZE) |
| 51 | return -EFBIG; | 51 | return -EFBIG; |
| 52 | } | 52 | } |
| 53 | return generic_file_open(vi, filp); | 53 | return generic_file_open(vi, filp); |
| @@ -94,6 +94,11 @@ static int ntfs_file_fsync(struct file *filp, struct dentry *dentry, | |||
| 94 | if (!datasync || !NInoNonResident(NTFS_I(vi))) | 94 | if (!datasync || !NInoNonResident(NTFS_I(vi))) |
| 95 | ret = ntfs_write_inode(vi, 1); | 95 | ret = ntfs_write_inode(vi, 1); |
| 96 | write_inode_now(vi, !datasync); | 96 | write_inode_now(vi, !datasync); |
| 97 | /* | ||
| 98 | * NOTE: If we were to use mapping->private_list (see ext2 and | ||
| 99 | * fs/buffer.c) for dirty blocks then we could optimize the below to be | ||
| 100 | * sync_mapping_buffers(vi->i_mapping). | ||
| 101 | */ | ||
| 97 | err = sync_blockdev(vi->i_sb->s_bdev); | 102 | err = sync_blockdev(vi->i_sb->s_bdev); |
| 98 | if (unlikely(err && !ret)) | 103 | if (unlikely(err && !ret)) |
| 99 | ret = err; | 104 | ret = err; |
