Skip to content

Commit c3e637c

Browse files
committed
ext2: Remove GFP_NOFS use in ext2_xattr_cache_insert()
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]>
1 parent 3697561 commit c3e637c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ext2/xattr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
874874
__u32 hash = le32_to_cpu(HDR(bh)->h_hash);
875875
int error;
876876

877-
error = mb_cache_entry_create(cache, GFP_NOFS, hash, bh->b_blocknr,
877+
error = mb_cache_entry_create(cache, GFP_KERNEL, hash, bh->b_blocknr,
878878
true);
879879
if (error) {
880880
if (error == -EBUSY) {

0 commit comments

Comments
 (0)