Skip to content

Commit

Permalink
ext2: Remove GFP_NOFS use in ext2_xattr_cache_insert()
Browse files Browse the repository at this point in the history
ext2_xattr_cache_insert() calls mb_cache_entry_create() with GFP_NOFS
because it is called under EXT2_I(inode)->xattr_sem. However xattr_sem
or any higher ranking lock is not acquired on fs reclaim path for ext2
at least since we don't do page writeback from direct reclaim.  Thus
GFP_NOFS is not needed.

Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
jankara committed Jan 23, 2024
1 parent 3697561 commit c3e637c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
int error;

error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr,
error = mb_cache_entry_create(cache, GFP_KERNEL, hash, bh->b_blocknr,
true);
if (error) {
if (error == -EBUSY) {
Expand Down

0 comments on commit c3e637c

Please sign in to comment.