It contradicts NVMe specification where alignment is only required when atomic write boundary (NABSPF/NABO) is set and highly limits usage of NVMe atomic writes Signed-off-by: Vitaliy Filippov --- fs/read_write.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index 833bae068770..8b901be75a9f 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1807,12 +1807,6 @@ int generic_atomic_write_valid(struct kiocb *iocb, struct iov_iter *iter) if (!iter_is_ubuf(iter)) return -EINVAL; - if (!is_power_of_2(len)) - return -EINVAL; - - if (!IS_ALIGNED(iocb->ki_pos, len)) - return -EINVAL; - if (!(iocb->ki_flags & IOCB_DIRECT)) return -EOPNOTSUPP; -- 2.51.0