[PATCH 5/9] ntfs: Remove FGP_NOFS from __ntfs_inode_resident_attr_pwrite()

From: Matthew Wilcox (Oracle)

Date: Sun Aug 30 2026 - 00:21:08 EST


I do not believe that FGP_NOFS is needed here. This function is called
from one place (ntfs_inode_attr_pwrite) which calls either this function
or __ntfs_inode_non_resident_attr_pwrite(). The latter function does not
use FGP_NOFS in its calls to allocate pagecaache memory, so it should not
be needed here either. If it turns out to be needed by both functions,
then we should use memalloc_nofs_save at a higher level to protect both
of them.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
fs/ntfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs/inode.c b/fs/ntfs/inode.c
index 32edb4045178..36a0d6b26c02 100644
--- a/fs/ntfs/inode.c
+++ b/fs/ntfs/inode.c
@@ -3676,7 +3676,7 @@ static s64 __ntfs_inode_resident_attr_pwrite(struct inode *vi,
mark_mft_record_dirty(ctx->ntfs_ino);

/* Keep the first page clean and uptodate */
- folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN | FGP_NOFS,
+ folio = __filemap_get_folio(mapping, 0, FGP_WRITEBEGIN,
mapping_gfp_mask(mapping));
if (IS_ERR(folio)) {
err = PTR_ERR(folio);
--
2.47.3