On Sat, Feb 01, 2020 at 12:00:39PM +0800, qiwuchen55@xxxxxxxxx wrote: > From: chenqiwu <chenqiwu@xxxxxxxxxx> > > Remove trivial nowait check for ext4_buffered_write_iter(), > since buffered writes will return -EINVAL if IOCB_NOWAIT > passed in the follow-up function ext4_write_checks()-> > ext4_generic_write_checks()->generic_write_checks(). > > Signed-off-by: chenqiwu <chenqiwu@xxxxxxxxxx> The reason why we do this check here is so that we return immediately and not potentially block when we call inode_lock(). Otherwise, an AIO request with IOCB_NOWAIT could block, and that's not allowed. - Ted