* [PATCH 1/1] udf: block-based fs should use generic_write_end()
@ 2015-03-20 3:37 Taesoo Kim
2015-04-01 7:53 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Taesoo Kim @ 2015-03-20 3:37 UTC (permalink / raw)
To: jack, linux-kernel; +Cc: taesoo, changwoo, sanidhya, blee, csong84, Taesoo Kim
simple_write_end() is for non-block fs, which doesn't invoke
mark_inode_dirty(). Instead, generic_write_end() correctly
handles such case when i_size has changed.
Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
---
fs/udf/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 08f3555..28b1dab 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -112,7 +112,7 @@ const struct address_space_operations udf_adinicb_aops = {
.readpage = udf_adinicb_readpage,
.writepage = udf_adinicb_writepage,
.write_begin = udf_adinicb_write_begin,
- .write_end = simple_write_end,
+ .write_end = generic_write_end,
.direct_IO = udf_adinicb_direct_IO,
};
--
2.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] udf: block-based fs should use generic_write_end()
2015-03-20 3:37 [PATCH 1/1] udf: block-based fs should use generic_write_end() Taesoo Kim
@ 2015-04-01 7:53 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2015-04-01 7:53 UTC (permalink / raw)
To: Taesoo Kim; +Cc: jack, linux-kernel, taesoo, changwoo, sanidhya, blee, csong84
On Thu 19-03-15 23:37:59, Taesoo Kim wrote:
> simple_write_end() is for non-block fs, which doesn't invoke
> mark_inode_dirty(). Instead, generic_write_end() correctly
> handles such case when i_size has changed.
>
> Signed-off-by: Taesoo Kim <tsgatesv@gmail.com>
So simple_write_end() is actually correct in that place. We cannot even
use generic_write_end() because that page doesn't have buffers attached -
it's a special case of a file which is smaller than a block and is packed
in the inode. Please test the patch better next time - this would oops on
you the first time you try to write to such a file. Thanks!
Honza
> ---
> fs/udf/file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/udf/file.c b/fs/udf/file.c
> index 08f3555..28b1dab 100644
> --- a/fs/udf/file.c
> +++ b/fs/udf/file.c
> @@ -112,7 +112,7 @@ const struct address_space_operations udf_adinicb_aops = {
> .readpage = udf_adinicb_readpage,
> .writepage = udf_adinicb_writepage,
> .write_begin = udf_adinicb_write_begin,
> - .write_end = simple_write_end,
> + .write_end = generic_write_end,
> .direct_IO = udf_adinicb_direct_IO,
> };
>
> --
> 2.3.3
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-01 7:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 3:37 [PATCH 1/1] udf: block-based fs should use generic_write_end() Taesoo Kim
2015-04-01 7:53 ` Jan Kara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).