diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-19 21:01:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:12:55 -0400 |
commit | 8d71db4f0890605d44815a2b2da4ca003f1bb142 (patch) | |
tree | e5bb078717c3e8ace7f032b940ada7901dbab545 /include/linux/fs.h | |
parent | 5f2e354f5212a49fc639c25de2581cc8ae90d11b (diff) |
lift sb_start_write/sb_end_write out of ->aio_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2c28271ab9d4..578a66e6ee72 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -2223,6 +2223,20 @@ static inline struct inode *file_inode(struct file *f) | |||
2223 | return f->f_inode; | 2223 | return f->f_inode; |
2224 | } | 2224 | } |
2225 | 2225 | ||
2226 | static inline void file_start_write(struct file *file) | ||
2227 | { | ||
2228 | if (!S_ISREG(file_inode(file)->i_mode)) | ||
2229 | return; | ||
2230 | __sb_start_write(file_inode(file)->i_sb, SB_FREEZE_WRITE, true); | ||
2231 | } | ||
2232 | |||
2233 | static inline void file_end_write(struct file *file) | ||
2234 | { | ||
2235 | if (!S_ISREG(file_inode(file)->i_mode)) | ||
2236 | return; | ||
2237 | __sb_end_write(file_inode(file)->i_sb, SB_FREEZE_WRITE); | ||
2238 | } | ||
2239 | |||
2226 | /* | 2240 | /* |
2227 | * get_write_access() gets write permission for a file. | 2241 | * get_write_access() gets write permission for a file. |
2228 | * put_write_access() releases this write permission. | 2242 | * put_write_access() releases this write permission. |