aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/porting14
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 1eb76959d096..ccf0ce7866b9 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -346,3 +346,17 @@ look at examples of other filesystems) for guidance.
346for details of what locks to replace dcache_lock with in order to protect 346for details of what locks to replace dcache_lock with in order to protect
347particular things. Most of the time, a filesystem only needs ->d_lock, which 347particular things. Most of the time, a filesystem only needs ->d_lock, which
348protects *all* the dcache state of a given dentry. 348protects *all* the dcache state of a given dentry.
349
350--
351[mandatory]
352
353 Filesystems must RCU-free their inodes, if they can have been accessed
354via rcu-walk path walk (basically, if the file can have had a path name in the
355vfs namespace).
356
357 i_dentry and i_rcu share storage in a union, and the vfs expects
358i_dentry to be reinitialized before it is freed, so an:
359
360 INIT_LIST_HEAD(&inode->i_dentry);
361
362must be done in the RCU callback.