Skip to content

Commit adaae72

Browse files
Christoph Hellwigtorvalds
authored andcommitted
update Documentation/filesystems/Locking for 2.6.27 changes
In the 2.6.27 circle ->fasync lost the BKL, and the last remaining ->open variant that takes the BKL is also gone. ->get_sb and ->kill_sb didn't have BKL forever, so updated the entries while we're at that. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 82a28c7 commit adaae72

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

Documentation/filesystems/Locking

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ prototypes:
144144
void (*kill_sb) (struct super_block *);
145145
locking rules:
146146
may block BKL
147-
get_sb yes yes
148-
kill_sb yes yes
147+
get_sb yes no
148+
kill_sb yes no
149149

150150
->get_sb() returns error or 0 with locked superblock attached to the vfsmount
151151
(exclusive on ->s_umount).
@@ -409,12 +409,12 @@ ioctl: yes (see below)
409409
unlocked_ioctl: no (see below)
410410
compat_ioctl: no
411411
mmap: no
412-
open: maybe (see below)
412+
open: no
413413
flush: no
414414
release: no
415415
fsync: no (see below)
416416
aio_fsync: no
417-
fasync: yes (see below)
417+
fasync: no
418418
lock: yes
419419
readv: no
420420
writev: no
@@ -431,13 +431,6 @@ For many filesystems, it is probably safe to acquire the inode
431431
semaphore. Note some filesystems (i.e. remote ones) provide no
432432
protection for i_size so you will need to use the BKL.
433433

434-
->open() locking is in-transit: big lock partially moved into the methods.
435-
The only exception is ->open() in the instances of file_operations that never
436-
end up in ->i_fop/->proc_fops, i.e. ones that belong to character devices
437-
(chrdev_open() takes lock before replacing ->f_op and calling the secondary
438-
method. As soon as we fix the handling of module reference counters all
439-
instances of ->open() will be called without the BKL.
440-
441434
Note: ext2_release() was *the* source of contention on fs-intensive
442435
loads and dropping BKL on ->release() helps to get rid of that (we still
443436
grab BKL for cases when we close a file that had been opened r/w, but that

0 commit comments

Comments
 (0)