cifs: Don't use certain unnecessary folio_*() functions
authorDavid Howells <dhowells@redhat.com>
Tue, 9 Jan 2024 17:54:35 +0000 (17:54 +0000)
committerDavid Howells <dhowells@redhat.com>
Mon, 22 Jan 2024 21:57:13 +0000 (21:57 +0000)
commitc40497d82387188f14d9adc4caa58ee1cb1999e1
tree66431e1b9d5142b2464f4ebcf71b9d8bfae805a4
parentfa7d614da3c556c7ef71023cb8c410a3e8571a42
cifs: Don't use certain unnecessary folio_*() functions

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
fs/smb/client/file.c