]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: Don't use certain unnecessary folio_*() functions
authorDavid Howells <dhowells@redhat.com>
Tue, 9 Jan 2024 17:54:35 +0000 (17:54 +0000)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:57 +0000 (18:19 -0400)
commitd3c792357cda808333d46e32d75fc84bd701ae23
tree789807b3242f048d98eb74eb10554b2db130e5a2
parent2e411c57562f81144431caa45ba33c7d6da86037
cifs: Don't use certain unnecessary folio_*() functions

[ Upstream commit c40497d82387188f14d9adc4caa58ee1cb1999e1 ]

Filesystems should use folio->index and folio->mapping, instead of
folio_index(folio), folio_mapping() and folio_file_mapping() since
they know that it's in the pagecache.

Change this automagically with:

perl -p -i -e 's/folio_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c
perl -p -i -e 's/folio_file_mapping[(]([^)]*)[)]/\1->mapping/g' fs/smb/client/*.c
perl -p -i -e 's/folio_index[(]([^)]*)[)]/\1->index/g' fs/smb/client/*.c

Reported-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: Steve French <sfrench@samba.org>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Ronnie Sahlberg <lsahlber@redhat.com>
cc: Shyam Prasad N <sprasad@microsoft.com>
cc: Tom Talpey <tom@talpey.com>
cc: linux-cifs@vger.kernel.org
cc: linux-fsdevel@vger.kernel.org
Stable-dep-of: f3dc1bdb6b0b ("cifs: Fix writeback data corruption")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/file.c