block_dev: support RFW_NOWAIT on block device nodes

All support is already there in the generic code, we just need to wire
it up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by Christoph Hellwig and committed by Al Viro c35fc7a5 91f9943e

+5
+5
fs/block_dev.c
··· 1739 1739 */ 1740 1740 filp->f_flags |= O_LARGEFILE; 1741 1741 1742 + filp->f_mode |= FMODE_NOWAIT; 1743 + 1742 1744 if (filp->f_flags & O_NDELAY) 1743 1745 filp->f_mode |= FMODE_NDELAY; 1744 1746 if (filp->f_flags & O_EXCL) ··· 1892 1890 1893 1891 if (iocb->ki_pos >= size) 1894 1892 return -ENOSPC; 1893 + 1894 + if ((iocb->ki_flags & (IOCB_NOWAIT | IOCB_DIRECT)) == IOCB_NOWAIT) 1895 + return -EOPNOTSUPP; 1895 1896 1896 1897 iov_iter_truncate(from, size - iocb->ki_pos); 1897 1898