Skip to content

Commit 82df083

Browse files
committed
[draft] fix might_sleep() in inode.c
Signed-off-by: Tingmao Wang <[email protected]>
1 parent 9c0826a commit 82df083

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/inode.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,8 @@ static void evict(struct inode *inode)
815815
{
816816
const struct super_operations *op = inode->i_sb->s_op;
817817

818+
might_sleep();
819+
818820
BUG_ON(!(inode_state_read_once(inode) & I_FREEING));
819821
BUG_ON(!list_empty(&inode->i_lru));
820822

@@ -1969,7 +1971,6 @@ static void iput_final(struct inode *inode)
19691971
*/
19701972
void iput(struct inode *inode)
19711973
{
1972-
might_sleep();
19731974
if (unlikely(!inode))
19741975
return;
19751976

0 commit comments

Comments
 (0)