search for: iov_iter_alignment

Displaying 10 results from an estimated 10 matches for "iov_iter_alignment".

2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
...c ssize_t erofs_file_read_iter(struct kiocb *iocb, struct iov_iter *to) if (bdev) blksize_mask = bdev_logical_block_size(bdev) - 1; else - blksize_mask = (1 << inode->i_blkbits) - 1; + blksize_mask = i_blockmask(inode); if ((iocb->ki_pos | iov_iter_count(to) | iov_iter_alignment(to)) & blksize_mask) -- 2.25.1
2023 Mar 10
1
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...er *to) >> if (bdev) >> blksize_mask = bdev_logical_block_size(bdev) - 1; >> else >> - blksize_mask = i_blocksize(inode) - 1; >> + blksize_mask = i_blockmask(inode); >> >> if ((iocb->ki_pos | iov_iter_count(to) | >> iov_iter_alignment(to)) & blksize_mask) >> -- >> 2.25.1 >>
2023 Mar 10
3
[PATCH v3 2/6] erofs: convert to use i_blockmask()
...iter(struct kiocb *iocb, struct iov_iter *to) > if (bdev) > blksize_mask = bdev_logical_block_size(bdev) - 1; > else > - blksize_mask = i_blocksize(inode) - 1; > + blksize_mask = i_blockmask(inode); > > if ((iocb->ki_pos | iov_iter_count(to) | > iov_iter_alignment(to)) & blksize_mask) > -- > 2.25.1 >
2023 Mar 09
8
[PATCH v3 1/6] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v3: -none v2: -convert to i_blockmask() include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c85916e9f7db..17387d465b8b
2023 Mar 10
1
[PATCH v4 2/5] erofs: convert to use i_blockmask()
...ocb, struct iov_iter *to) > if (bdev) > blksize_mask = bdev_logical_block_size(bdev) - 1; > else > - blksize_mask = (1 << inode->i_blkbits) - 1; > + blksize_mask = i_blockmask(inode); > > if ((iocb->ki_pos | iov_iter_count(to) | > iov_iter_alignment(to)) & blksize_mask)
2023 Mar 09
5
[PATCH v2 1/5] fs: add i_blockmask()
The message from this sender included one or more files which could not be scanned for virus detection; do not open these files unless you are certain of the sender's intent. ---------------------------------------------------------------------- Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()").
2023 Mar 10
5
[PATCH v4 1/5] fs: add i_blockmask()
Introduce i_blockmask() to simplify code, which replace (i_blocksize(node) - 1). Like done in commit 93407472a21b("fs: add i_blocksize()"). Signed-off-by: Yangtao Li <frank.li at vivo.com> --- v4: -drop ext4 patch -erofs patch based on mainline -a bit change in ocfs2 patch include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/fs.h
2016 Jun 17
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...t = copy_from_iter(addr, bytes, i); + if (!IS_ERR_VALUE(ret) && test_bit(MMF_UNSTABLE, &mm->flags)) + return -EFAULT; + return ret; +} size_t copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i); size_t iov_iter_zero(size_t bytes, struct iov_iter *); unsigned long iov_iter_alignment(const struct iov_iter *i); diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6303bc7caeda..3fa43e96a59b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -506,6 +506,12 @@ static bool __oom_reap_task(struct task_struct *tsk) goto mm_drop; } + /* + * Tell all users of get_user_mm/copy_from_us...
2016 Jun 17
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...t = copy_from_iter(addr, bytes, i); + if (!IS_ERR_VALUE(ret) && test_bit(MMF_UNSTABLE, &mm->flags)) + return -EFAULT; + return ret; +} size_t copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i); size_t iov_iter_zero(size_t bytes, struct iov_iter *); unsigned long iov_iter_alignment(const struct iov_iter *i); diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 6303bc7caeda..3fa43e96a59b 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -506,6 +506,12 @@ static bool __oom_reap_task(struct task_struct *tsk) goto mm_drop; } + /* + * Tell all users of get_user_mm/copy_from_us...
2016 Jun 18
0
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...> + if (!IS_ERR_VALUE(ret) && test_bit(MMF_UNSTABLE, &mm->flags)) > + return -EFAULT; > + return ret; > +} > size_t copy_from_iter_nocache(void *addr, size_t bytes, struct iov_iter *i); > size_t iov_iter_zero(size_t bytes, struct iov_iter *); > unsigned long iov_iter_alignment(const struct iov_iter *i); > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index 6303bc7caeda..3fa43e96a59b 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -506,6 +506,12 @@ static bool __oom_reap_task(struct task_struct *tsk) > goto mm_drop; > } > > + /* &g...