Skip to content

Commit

Permalink
Documentation: Fix up docs still talking about i_sem
Browse files Browse the repository at this point in the history
.. it got changed to 'i_mutex' some time ago.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Josef 'Jeff' Sipek authored and Linus Torvalds committed May 24, 2007
1 parent 8f53b6f commit c2b3898
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions Documentation/filesystems/directory-locking
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Locking scheme used for directory operations is based on two
kinds of locks - per-inode (->i_sem) and per-filesystem (->s_vfs_rename_sem).
kinds of locks - per-inode (->i_mutex) and per-filesystem
(->s_vfs_rename_mutex).

For our purposes all operations fall in 5 classes:

Expand Down Expand Up @@ -63,7 +64,7 @@ objects - A < B iff A is an ancestor of B.
attempt to acquire some lock and already holds at least one lock. Let's
consider the set of contended locks. First of all, filesystem lock is
not contended, since any process blocked on it is not holding any locks.
Thus all processes are blocked on ->i_sem.
Thus all processes are blocked on ->i_mutex.

Non-directory objects are not contended due to (3). Thus link
creation can't be a part of deadlock - it can't be blocked on source
Expand Down
8 changes: 4 additions & 4 deletions Documentation/filesystems/porting
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ free to drop it...
---
[informational]

->link() callers hold ->i_sem on the object we are linking to. Some of your
->link() callers hold ->i_mutex on the object we are linking to. Some of your
problems might be over...

---
Expand All @@ -130,9 +130,9 @@ went in - and hadn't been documented ;-/). Just remove it from fs_flags
---
[mandatory]

->setattr() is called without BKL now. Caller _always_ holds ->i_sem, so
watch for ->i_sem-grabbing code that might be used by your ->setattr().
Callers of notify_change() need ->i_sem now.
->setattr() is called without BKL now. Caller _always_ holds ->i_mutex, so
watch for ->i_mutex-grabbing code that might be used by your ->setattr().
Callers of notify_change() need ->i_mutex now.

---
[recommended]
Expand Down

0 comments on commit c2b3898

Please sign in to comment.