> +/* > + * Sleep until I_SYNC is cleared. This function must be called with i_lock > + * held and drops it. It is aimed for callers not holding any inode reference > + * so once i_lock is dropped, inode can go away. > + */ > +static void inode_sleep_on_writeback(struct inode *inode) > + __releases(inode->i_lock) > +{ > + DEFINE_WAIT(wait); > + wait_queue_head_t *wqh = bit_waitqueue(&inode->i_state, __I_SYNC); > + int sleep; i_state is "unsigned long", it's better to use the same type. > + > + prepare_to_wait(wqh, &wait, TASK_UNINTERRUPTIBLE); > + sleep = inode->i_state & I_SYNC; > + spin_unlock(&inode->i_lock); > + if (sleep) > + schedule(); > + finish_wait(wqh, &wait); > +} > + -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html