shmem: set a_ops earlier in shmem_symlink
authorChristoph Hellwig <hch@lst.de>
Mon, 19 Feb 2024 06:27:11 +0000 (07:27 +0100)
committerChandan Babu R <chandanbabu@kernel.org>
Wed, 21 Feb 2024 06:06:50 +0000 (11:36 +0530)
commite11381d83d72198565f4545d9988b4720288eb64
treedcd401b99fd45db7f5808e1f00093b5638b42501
parentaefacb2041f77784059b86c5fd151066859ad19a
shmem: set a_ops earlier in shmem_symlink

Set the a_ops in shmem_symlink before reading a folio from the mapping
to prepare for asserting that shmem_get_folio is only called on shmem
mappings.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
mm/shmem.c