Message ID | 20210806081112.257041336@linuxfoundation.org |
---|---|
State | New |
Headers | show |
Series | None | expand |
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 9912b5231bcf..5412361d0c27 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -6450,8 +6450,8 @@ void btrfs_log_new_name(struct btrfs_trans_handle *trans, * if this inode hasn't been logged and directory we're renaming it * from hasn't been logged, we don't need to log it */ - if (inode->logged_trans < trans->transid && - (!old_dir || old_dir->logged_trans < trans->transid)) + if (!inode_logged(trans, inode) && + (!old_dir || !inode_logged(trans, old_dir))) return; btrfs_init_log_ctx(&ctx, &inode->vfs_inode);