bcachefs: Change destroy_inode to free_inode
authorYouling Tang <tangyouling@kylinos.cn>
Fri, 26 Apr 2024 07:29:56 +0000 (15:29 +0800)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 8 May 2024 21:29:21 +0000 (17:29 -0400)
commit36aa49d33e8d59246bd338064d6a516f693954e5
tree626b1c511d896a91f5aaacfcd53c80c49c8515cb
parentc8bda9f20a01cef7e12fd230ada83d53f7cdc884
bcachefs: Change destroy_inode to free_inode

The vfs[1] documentation describes free_inode as follows:
```
free_inode
    this method is called from RCU callback. If you use call_rcu()
    in ->destroy_inode to free ‘struct inode’ memory, then it’s
    better to release memory in this method.
```

free_inode will be called by the RCU callback, so it might be better
to move the inode free operation to destroy_inode.

Similar to commit ae6b47b5653e ("fs/ntfs3: Change destroy_inode to
free_inode").

Link:
[1]: https://www.kernel.org/doc/html/latest/filesystems/vfs.html

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs.c