From 5861bc757f6c1b14e073bfe9bff240f82323a9a3 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Fri, 13 Dec 2024 19:44:18 +0100 Subject: [PATCH] Revert "fs: create kiocb_{start,end}_write() helpers" This reverts commit cf82fd7a6acaa13f31c9a96f2776578e2d83b27a. --- include/linux/fs.h | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 26cd54db8..68c471301 100755 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1826,41 +1826,6 @@ static inline bool sb_start_intwrite_trylock(struct super_block *sb) return __sb_start_write_trylock(sb, SB_FREEZE_FS); } -/** - * kiocb_start_write - get write access to a superblock for async file io - * @iocb: the io context we want to submit the write with - * - * This is a variant of sb_start_write() for async io submission. - * Should be matched with a call to kiocb_end_write(). - */ -static inline void kiocb_start_write(struct kiocb *iocb) -{ - struct inode *inode = file_inode(iocb->ki_filp); - - sb_start_write(inode->i_sb); - /* - * Fool lockdep by telling it the lock got released so that it - * doesn't complain about the held lock when we return to userspace. - */ - __sb_writers_release(inode->i_sb, SB_FREEZE_WRITE); -} - -/** - * kiocb_end_write - drop write access to a superblock after async file io - * @iocb: the io context we sumbitted the write with - * - * Should be matched with a call to kiocb_start_write(). - */ -static inline void kiocb_end_write(struct kiocb *iocb) -{ - struct inode *inode = file_inode(iocb->ki_filp); - - /* - * Tell lockdep we inherited freeze protection from submission thread. - */ - __sb_writers_acquired(inode->i_sb, SB_FREEZE_WRITE); - sb_end_write(inode->i_sb); -} extern bool inode_owner_or_capable(const struct inode *inode);