summaryrefslogtreecommitdiffstats
path: root/fs/udf/udfdecl.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2023-01-24 12:13:57 +0100
committerJan Kara <jack@suse.cz>2023-01-26 16:46:36 +0100
commitc694e40ba231e854fcddd25cce46db3918fca291 (patch)
treede802f5fd616a1cef0c0e1c6e99074849902f618 /fs/udf/udfdecl.h
parent60b99a1b9fa731453e1b69a3e0b3e4dcab7a6ea5 (diff)
downloadlinux-stable-c694e40ba231e854fcddd25cce46db3918fca291.tar.gz
linux-stable-c694e40ba231e854fcddd25cce46db3918fca291.tar.bz2
linux-stable-c694e40ba231e854fcddd25cce46db3918fca291.zip
udf: Convert all file types to use udf_write_end()
Switching address_space_operations while a file is used is difficult to do in a race-free way. To be able to use single address_space_operations in UDF, create udf_write_end() function that is able to handle both normal and in-ICB files. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udfdecl.h')
-rw-r--r--fs/udf/udfdecl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 32decf6b6a21..304c2ec81589 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -164,6 +164,9 @@ int udf_writepages(struct address_space *mapping, struct writeback_control *wbc)
int udf_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len,
struct page **pagep, void **fsdata);
+int udf_write_end(struct file *file, struct address_space *mapping,
+ loff_t pos, unsigned len, unsigned copied,
+ struct page *page, void *fsdata);
ssize_t udf_direct_IO(struct kiocb *iocb, struct iov_iter *iter);
extern int8_t inode_bmap(struct inode *, sector_t, struct extent_position *,
struct kernel_lb_addr *, uint32_t *, sector_t *);