add releasepage hooks to block devices which can be used by file systems
Implement blkdev_releasepage() to release the buffer_heads and pages after we release private data belonging to a mounted filesystem. Cc: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
0087d9fb3f
commit
87d8fe1ee6
3 changed files with 19 additions and 0 deletions
|
|
@ -565,6 +565,7 @@ struct address_space {
|
|||
struct block_device {
|
||||
dev_t bd_dev; /* not a kdev_t - it's a search key */
|
||||
struct inode * bd_inode; /* will die */
|
||||
struct super_block * bd_super;
|
||||
int bd_openers;
|
||||
struct mutex bd_mutex; /* open/close mutex */
|
||||
struct semaphore bd_mount_sem;
|
||||
|
|
@ -1385,6 +1386,7 @@ struct super_operations {
|
|||
ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
|
||||
ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
|
||||
#endif
|
||||
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue