Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1553125
| From | Fabian Frederick <fabf@skynet.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/12 linux-next] udf: atomically read inode size |
| Date | 2017-01-06 22:00 +0100 |
| Message-ID | <sWJMd-7eR-5@gated-at.bofh.it> (permalink) |
| References | <sWJMd-7eR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
See i_size_read() comments in include/linux/fs.h
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
fs/udf/lowlevel.c | 2 +-
fs/udf/super.c | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c
index 6ad5a45..5c7ec12 100644
--- a/fs/udf/lowlevel.c
+++ b/fs/udf/lowlevel.c
@@ -58,7 +58,7 @@ unsigned long udf_get_last_block(struct super_block *sb)
*/
if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock) ||
lblock == 0)
- lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits;
+ lblock = i_size_read(bdev->bd_inode) >> sb->s_blocksize_bits;
if (lblock)
return lblock - 1;
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 9256117..6b5a1a4 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -1213,7 +1213,8 @@ static int udf_load_vat(struct super_block *sb, int p_index, int type1_index)
struct udf_inode_info *vati;
uint32_t pos;
struct virtualAllocationTable20 *vat20;
- sector_t blocks = sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits;
+ sector_t blocks = i_size_read(sb->s_bdev->bd_inode) >>
+ sb->s_blocksize_bits;
udf_find_vat_block(sb, p_index, type1_index, sbi->s_last_block);
if (!sbi->s_vat_inode &&
@@ -1803,7 +1804,7 @@ static int udf_check_anchor_block(struct super_block *sb, sector_t block,
if (UDF_QUERY_FLAG(sb, UDF_FLAG_VARCONV) &&
udf_fixed_to_variable(block) >=
- sb->s_bdev->bd_inode->i_size >> sb->s_blocksize_bits)
+ i_size_read(sb->s_bdev->bd_inode) >> sb->s_blocksize_bits)
return -EAGAIN;
bh = udf_read_tagged(sb, block, block, &ident);
@@ -1865,7 +1866,7 @@ static int udf_scan_anchors(struct super_block *sb, sector_t *lastblock,
last[last_count++] = *lastblock - 152;
for (i = 0; i < last_count; i++) {
- if (last[i] >= sb->s_bdev->bd_inode->i_size >>
+ if (last[i] >= i_size_read(sb->s_bdev->bd_inode) >>
sb->s_blocksize_bits)
continue;
ret = udf_check_anchor_block(sb, last[i], fileset);
--
2.7.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/12 linux-next] udf: clean-up Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
[PATCH 09/12 linux-next] udf: merge module informations in super.c Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 09/12 linux-next] udf: merge module informations in super.c Jan Kara <jack@suse.cz> - 2017-01-10 12:00 +0100
[PATCH 04/12 linux-next] udf: remove unneeded line break Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 04/12 linux-next] udf: remove unneeded line break Jan Kara <jack@suse.cz> - 2017-01-10 11:40 +0100
[PATCH 05/12 linux-next] udf: remove empty condition Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 05/12 linux-next] udf: remove empty condition Jan Kara <jack@suse.cz> - 2017-01-10 11:40 +0100
[PATCH 08/12 linux-next] udf: remove next_epos from udf_update_extent_cache() Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 08/12 linux-next] udf: remove next_epos from udf_update_extent_cache() Jan Kara <jack@suse.cz> - 2017-01-10 12:00 +0100
[PATCH 01/12 linux-next] udf: use __packed instead of __attribute__ ((packed)) Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 01/12 linux-next] udf: use __packed instead of __attribute__ ((packed)) Jan Kara <jack@suse.cz> - 2017-01-10 11:40 +0100
[PATCH 02/12 linux-next] udf: use pointer for kernel_long_ad argument Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 02/12 linux-next] udf: use pointer for kernel_long_ad argument Jan Kara <jack@suse.cz> - 2017-01-10 11:40 +0100
[PATCH 10/12 linux-next] udf: atomically read inode size Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
[PATCH 11/12 linux-next] udf: replace 0xFFFFFFFF by ~0 Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 10/12 linux-next] udf: atomically read inode size Jan Kara <jack@suse.cz> - 2017-01-10 12:00 +0100
[PATCH 07/12 linux-next] udf: store allocation offset in udf_prealloc_extents() Fabian Frederick <fabf@skynet.be> - 2017-01-06 22:00 +0100
Re: [PATCH 07/12 linux-next] udf: store allocation offset in udf_prealloc_extents() Jan Kara <jack@suse.cz> - 2017-01-10 12:00 +0100
Re: [PATCH 00/12 linux-next] udf: clean-up Jan Kara <jack@suse.cz> - 2017-01-10 12:10 +0100
csiph-web