Skip to contentSkip to conversation

don't fetch the inode size beforehand.

PATCH Jeff Liu 2 participants 2 messages Aug 26, 2011 – Sep 6, 2011 Btrfs file system

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

Hello,

I think we don't need to fetch the inode size in advance. :-P.

fs/btrfs/file.c +1 -1
index e7872e4..f8ad957 100644
@@ -1698,7 +1698,7 @@ static int find_desired_extent(struct inode *inode, loff_t *offset, int origin)
     u64 lockend = i_size_read(inode);
     u64 start = *offset;
     u64 orig_start = *offset;
-    u64 len = i_size_read(inode);
+    u64 len;
     u64 last_end = 0;
     int ret = 0;
 

Thanks,
-Jeff

#1 lore raw

Hi,

Quoted 1 line · Jeff Liu

I think we don't need to fetch the inode size in advance. :-P.

yes, the value is not used and rewritten a few lines below anyway. Please send a patch with proper header and signed-off line to be accepted.

david

Quoted 22 lines
fs/btrfs/file.c +1 -1
index e7872e4..f8ad957 100644
@@ -1698,7 +1698,7 @@ static int find_desired_extent(struct inode
 *inode, loff_t *offset, int origin)
     u64 lockend = i_size_read(inode);
     u64 start = *offset;
     u64 orig_start = *offset;
-    u64 len = i_size_read(inode);
+    u64 len;
     u64 last_end = 0;
     int ret = 0;

Thanks,
-Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html