[2/2] ext4: fix compile error when using BUFFER_TRACE

Message ID 1547100399-127915-3-git-send-email-yi.zhang@huawei.com
State Awaiting Upstream
Headers show
Series
  • ext4: fix two compile problems
Related show

Commit Message

zhangyi (F) Jan. 10, 2019, 6:06 a.m.
Fix compile error below when using BUFFER_TRACE.

fs/ext4/inode.c: In function ‘ext4_expand_extra_isize’:
fs/ext4/inode.c:5979:19: error: request for member ‘bh’ in something not a structure or union
  BUFFER_TRACE(iloc.bh, "get_write_access");

Fixes: c03b45b853f58 ("ext4, project: expand inode extra size if possible")
Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
---
 fs/ext4/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jan Kara Jan. 10, 2019, 10:28 a.m. | #1
On Thu 10-01-19 14:06:39, zhangyi (F) wrote:
> Fix compile error below when using BUFFER_TRACE.
> 
> fs/ext4/inode.c: In function ‘ext4_expand_extra_isize’:
> fs/ext4/inode.c:5979:19: error: request for member ‘bh’ in something not a structure or union
>   BUFFER_TRACE(iloc.bh, "get_write_access");
> 
> Fixes: c03b45b853f58 ("ext4, project: expand inode extra size if possible")
> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>
> ---
>  fs/ext4/inode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks good. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> 
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index 22a9d81..b7384d5 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -5976,7 +5976,7 @@ int ext4_expand_extra_isize(struct inode *inode,
>  
>  	ext4_write_lock_xattr(inode, &no_expand);
>  
> -	BUFFER_TRACE(iloc.bh, "get_write_access");
> +	BUFFER_TRACE(iloc->bh, "get_write_access");
>  	error = ext4_journal_get_write_access(handle, iloc->bh);
>  	if (error) {
>  		brelse(iloc->bh);
> -- 
> 2.7.4
>
Theodore Ts'o Feb. 21, 2019, 4:33 p.m. | #2
On Thu, Jan 10, 2019 at 02:06:39PM +0800, zhangyi (F) wrote:
> Fix compile error below when using BUFFER_TRACE.
> 
> fs/ext4/inode.c: In function ‘ext4_expand_extra_isize’:
> fs/ext4/inode.c:5979:19: error: request for member ‘bh’ in something not a structure or union
>   BUFFER_TRACE(iloc.bh, "get_write_access");
> 
> Fixes: c03b45b853f58 ("ext4, project: expand inode extra size if possible")
> Signed-off-by: zhangyi (F) <yi.zhang@huawei.com>

Thanks, applied.

						- Ted

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 22a9d81..b7384d5 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5976,7 +5976,7 @@  int ext4_expand_extra_isize(struct inode *inode,
 
 	ext4_write_lock_xattr(inode, &no_expand);
 
-	BUFFER_TRACE(iloc.bh, "get_write_access");
+	BUFFER_TRACE(iloc->bh, "get_write_access");
 	error = ext4_journal_get_write_access(handle, iloc->bh);
 	if (error) {
 		brelse(iloc->bh);