diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/porting | 14 |
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. | |||
346 | for details of what locks to replace dcache_lock with in order to protect | 346 | for details of what locks to replace dcache_lock with in order to protect |
347 | particular things. Most of the time, a filesystem only needs ->d_lock, which | 347 | particular things. Most of the time, a filesystem only needs ->d_lock, which |
348 | protects *all* the dcache state of a given dentry. | 348 | protects *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 | ||
354 | via rcu-walk path walk (basically, if the file can have had a path name in the | ||
355 | vfs namespace). | ||
356 | |||
357 | i_dentry and i_rcu share storage in a union, and the vfs expects | ||
358 | i_dentry to be reinitialized before it is freed, so an: | ||
359 | |||
360 | INIT_LIST_HEAD(&inode->i_dentry); | ||
361 | |||
362 | must be done in the RCU callback. | ||