forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
aufs: i_nlink 1/2, protect aufs inode i_nlink
By the commit in linux-v3.3-rc1 7ada4db 2012-01-06 vfs: count unlinked inodes vfs:__destroy_inode() became available to produce a warning about sb->s_remove_count. Basically inode->i_nlink should be referenced by anytime, and protected by inode_lock() or something in changing-time. In aufs, Artur Piechocki found a problem and it is necessary to be protected by another lock. The problem is a warning produced by VFS:__destroy_inode() about superblock->s_remove_count. I am not sure whether the warning appears since linux-v3.3 or not. Some other recent (much later than v3.3) changes in mainline MAY be related to the lifetime of inode or its link count. On my test environment, the warning never appeared. Here aufs introduces a spinlock dedicated to i_nlink only. In aufs, every user of i_nlink and VFS functions for it should call this new function regardless the inode is aufs or not. Reported by Artur Piechocki on github. See-also: sfjro/aufs-standalone#44 Signed-off-by: J. R. Okajima <[email protected]>
- Loading branch information
Showing
4 changed files
with
104 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters