You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
lift sb_start_write/sb_end_write out of ->aio_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -2223,6 +2223,20 @@ static inline struct inode *file_inode(struct file *f)
|
||||
return f->f_inode;
|
||||
}
|
||||
|
||||
static inline void file_start_write(struct file *file)
|
||||
{
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
return;
|
||||
__sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true);
|
||||
}
|
||||
|
||||
static inline void file_end_write(struct file *file)
|
||||
{
|
||||
if (!S_ISREG(file_inode(file)->i_mode))
|
||||
return;
|
||||
__sb_end_write(file_inode(file)->i_sb, SB_FREEZE_WRITE);
|
||||
}
|
||||
|
||||
/*
|
||||
* get_write_access() gets write permission for a file.
|
||||
* put_write_access() releases this write permission.
|
||||
|
||||
Reference in New Issue
Block a user