Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-16 Thread Sean Fu
On Wed, Jan 10, 2018 at 03:02:55PM -0500, Theodore Ts'o wrote: > On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote: > > > > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I > > think that it is reasonable. while it got lock, zero would be returned > > in this case. > >

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-16 Thread Sean Fu
On Wed, Jan 10, 2018 at 03:02:55PM -0500, Theodore Ts'o wrote: > On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote: > > > > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I > > think that it is reasonable. while it got lock, zero would be returned > > in this case. > >

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-10 Thread Theodore Ts'o
On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote: > > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I > think that it is reasonable. while it got lock, zero would be returned > in this case. Returning -EAGAIN and 0 are not the same thing. Specifically returning 0 means

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-10 Thread Theodore Ts'o
On Wed, Jan 10, 2018 at 10:01:49PM +0800, Sean Fu wrote: > > Correct, IOCB_NOWAIT read with zero count can return -EAGAIN, But I > think that it is reasonable. while it got lock, zero would be returned > in this case. Returning -EAGAIN and 0 are not the same thing. Specifically returning 0 means

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-10 Thread Sean Fu
On Wed, Jan 03, 2018 at 02:08:05AM +, Al Viro wrote: > On Wed, Dec 27, 2017 at 04:19:58PM +0800, Sean Fu wrote: > > generic_file_read_iter has done the count test. > > So ext4_file_read_iter don't need to test the count repeatedly. > > Huh? You do realize that generic_file_read_iter() is not

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-10 Thread Sean Fu
On Wed, Jan 03, 2018 at 02:08:05AM +, Al Viro wrote: > On Wed, Dec 27, 2017 at 04:19:58PM +0800, Sean Fu wrote: > > generic_file_read_iter has done the count test. > > So ext4_file_read_iter don't need to test the count repeatedly. > > Huh? You do realize that generic_file_read_iter() is not

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-02 Thread Al Viro
On Wed, Dec 27, 2017 at 04:19:58PM +0800, Sean Fu wrote: > generic_file_read_iter has done the count test. > So ext4_file_read_iter don't need to test the count repeatedly. Huh? You do realize that generic_file_read_iter() is not the only variant possible there, right? static ssize_t

Re: [PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2018-01-02 Thread Al Viro
On Wed, Dec 27, 2017 at 04:19:58PM +0800, Sean Fu wrote: > generic_file_read_iter has done the count test. > So ext4_file_read_iter don't need to test the count repeatedly. Huh? You do realize that generic_file_read_iter() is not the only variant possible there, right? static ssize_t

[PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2017-12-27 Thread Sean Fu
generic_file_read_iter has done the count test. So ext4_file_read_iter don't need to test the count repeatedly. Signed-off-by: Sean Fu --- fs/ext4/file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index a0ae27b..87ca13e 100644 ---

[PATCH] ext4: Remove repeated test in ext4_file_read_iter.

2017-12-27 Thread Sean Fu
generic_file_read_iter has done the count test. So ext4_file_read_iter don't need to test the count repeatedly. Signed-off-by: Sean Fu --- fs/ext4/file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/ext4/file.c b/fs/ext4/file.c index a0ae27b..87ca13e 100644 --- a/fs/ext4/file.c +++