Skip to content

Commit

Permalink
vfs: update documentation on ->i_dentry handling
Browse files Browse the repository at this point in the history
we used to need to clean it in RCU callback freeing an inode;
in 3.2 that requirement went away.  Unfortunately, it hadn't
been reflected in Documentation/filesystems/porting.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 14, 2012
1 parent 7968ce1 commit 049b3c1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions Documentation/filesystems/porting
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,10 @@ protects *all* the dcache state of a given dentry.
via rcu-walk path walk (basically, if the file can have had a path name in the
vfs namespace).

i_dentry and i_rcu share storage in a union, and the vfs expects
i_dentry to be reinitialized before it is freed, so an:

INIT_LIST_HEAD(&inode->i_dentry);

must be done in the RCU callback.
Even though i_dentry and i_rcu share storage in a union, we will
initialize the former in inode_init_always(), so just leave it alone in
the callback. It used to be necessary to clean it there, but not anymore
(starting at 3.2).

--
[recommended]
Expand Down

0 comments on commit 049b3c1

Please sign in to comment.