diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2004-11-11 07:34:00 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-05-04 11:57:47 -0400 |
commit | 66129f88c4cc719591f687e5c8c764fe9d3e437a (patch) | |
tree | 3fc9f181a1666eff445bdb6a243dd4e080c233f9 /fs/ntfs/logfile.c | |
parent | da28438cae9a271c5c232177f81dfb243de9b7fa (diff) |
NTFS: Use i_size_read() in fs/ntfs/logfile.c::ntfs_{check,empty}_logfile().
Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/logfile.c')
-rw-r--r-- | fs/ntfs/logfile.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c index 5e280abafab3..e680dd0cdb64 100644 --- a/fs/ntfs/logfile.c +++ b/fs/ntfs/logfile.c | |||
@@ -443,7 +443,7 @@ BOOL ntfs_check_logfile(struct inode *log_vi) | |||
443 | /* An empty $LogFile must have been clean before it got emptied. */ | 443 | /* An empty $LogFile must have been clean before it got emptied. */ |
444 | if (NVolLogFileEmpty(vol)) | 444 | if (NVolLogFileEmpty(vol)) |
445 | goto is_empty; | 445 | goto is_empty; |
446 | size = log_vi->i_size; | 446 | size = i_size_read(log_vi); |
447 | /* Make sure the file doesn't exceed the maximum allowed size. */ | 447 | /* Make sure the file doesn't exceed the maximum allowed size. */ |
448 | if (size > MaxLogFileSize) | 448 | if (size > MaxLogFileSize) |
449 | size = MaxLogFileSize; | 449 | size = MaxLogFileSize; |
@@ -689,7 +689,8 @@ BOOL ntfs_empty_logfile(struct inode *log_vi) | |||
689 | if (!NVolLogFileEmpty(vol)) { | 689 | if (!NVolLogFileEmpty(vol)) { |
690 | int err; | 690 | int err; |
691 | 691 | ||
692 | err = ntfs_attr_set(NTFS_I(log_vi), 0, log_vi->i_size, 0xff); | 692 | err = ntfs_attr_set(NTFS_I(log_vi), 0, i_size_read(log_vi), |
693 | 0xff); | ||
693 | if (unlikely(err)) { | 694 | if (unlikely(err)) { |
694 | ntfs_error(vol->sb, "Failed to fill $LogFile with " | 695 | ntfs_error(vol->sb, "Failed to fill $LogFile with " |
695 | "0xff bytes (error code %i).", err); | 696 | "0xff bytes (error code %i).", err); |