Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e325d3a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent f6cc746b
Loading
Loading
Loading
Loading
+22 −21
Original line number Original line Diff line number Diff line
@@ -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