Skip to contentSkip to conversation

hfsplus: atomically read inode size

PATCH New [email protected] 1 participant 1 message Feb 27, 2017 Hfsplus filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 13/78 hfsplus: atomically read inode size

From: Fabian Frederick <[email protected]>
Subject: hfsplus: atomically read inode size

See i_size_read() comments in include/linux/fs.h

---

 fs/hfsplus/wrapper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/hfsplus/wrapper.c renamed from fs/hfsplus/wrapper.c~hfsplus-atomically-read-inode-size +1 -1
diff -puN fs/hfsplus/wrapper.c~hfsplus-atomically-read-inode-size fs/hfsplus/wrapper.c
@@ -132,7 +132,7 @@ static int hfsplus_get_last_session(stru
 
 	/* default values */
 	*start = 0;
-	*size = sb->s_bdev->bd_inode->i_size >> 9;
+	*size = i_size_read(sb->s_bdev->bd_inode) >> 9;
 
 	if (HFSPLUS_SB(sb)->session >= 0) {
 		te.cdte_track = HFSPLUS_SB(sb)->session;

_