Skip to content

Commit 7266f0a

Browse files
author
Ingo Molnar
committed
fs/bcachefs: Fix __wait_on_freeing_inode() definition of waitqueue entry
The following recent commit made DEFINE_WAIT_BIT() type requirements stricter: 2382d68 ("sched: change wake_up_bit() and related function to expect unsigned long *") .. which results in a build failure: > fs/bcachefs/fs.c: In function '__wait_on_freeing_inode': > fs/bcachefs/fs.c:281:31: error: initialization of 'long unsigned int *' from incompatible pointer type 'u32 *' {aka 'unsigned int *'} [-Wincompatible-pointer-types] > 281 | DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW); Since this code relies on the waitqueue initialization within inode_bit_waitqueue() anyway, the DEFINE_WAIT_BIT() initialization is unnecessary - we can just declare a waitqueue entry. Reported-by: Stephen Rothwell <[email protected]> Suggested-by: NeilBrown <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 0ac8f14 commit 7266f0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/bcachefs/fs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,9 @@ static void __wait_on_freeing_inode(struct bch_fs *c,
183183
struct bch_inode_info *inode,
184184
subvol_inum inum)
185185
{
186+
struct wait_bit_queue_entry wait;
186187
wait_queue_head_t *wq;
187-
DEFINE_WAIT_BIT(wait, &inode->v.i_state, __I_NEW);
188+
188189
wq = inode_bit_waitqueue(&wait, &inode->v, __I_NEW);
189190
prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
190191
spin_unlock(&inode->v.i_lock);

0 commit comments

Comments
 (0)