update Documentation/filesystems/Locking

The rules for locking in many superblock operations has changed
significantly, so update the documentation for it.  Also correct some
older updates and ommissions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig 2009-06-19 20:22:37 +02:00 committed by Al Viro
parent f6cc746bbb
commit 7e325d3a6b

View file

@ -109,27 +109,28 @@ prototypes:
locking rules: locking rules:
All may block. All may block.
BKL s_lock s_umount None have BKL
alloc_inode: no no no s_umount
destroy_inode: no alloc_inode:
dirty_inode: no (must not sleep) destroy_inode:
write_inode: no dirty_inode: (must not sleep)
drop_inode: no !!!inode_lock!!! write_inode:
delete_inode: no drop_inode: !!!inode_lock!!!
put_super: yes yes no delete_inode:
write_super: no yes read put_super: write
sync_fs: no no read write_super: read
freeze_fs: ? sync_fs: read
unfreeze_fs: ? freeze_fs: read
statfs: no no no unfreeze_fs: read
remount_fs: yes yes maybe (see below) statfs: no
clear_inode: no remount_fs: maybe (see below)
umount_begin: yes no no clear_inode:
show_options: no (vfsmount->sem) umount_begin: no
quota_read: no no no (see below) show_options: no (namespace_sem)
quota_write: no no no (see below) quota_read: no (see below)
quota_write: no (see below)
->remount_fs() will have the s_umount lock if it's already mounted. ->remount_fs() will have the s_umount exclusive lock if it's already mounted.
When called from get_sb_single, it does NOT have the s_umount lock. When called from get_sb_single, it does NOT have the s_umount lock.
->quota_read() and ->quota_write() functions are both guaranteed to ->quota_read() and ->quota_write() functions are both guaranteed to
be the only ones operating on the quota file by the quota code (via be the only ones operating on the quota file by the quota code (via