mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
fs: rcu-walk aware d_revalidate method
Require filesystems be aware of .d_revalidate being called in rcu-walk mode (nd->flags & LOOKUP_RCU). For now do a simple push down, returning -ECHILD from all implementations. Signed-off-by: Nick Piggin <[email protected]>
This commit is contained in:
parent
44a7d7a878
commit
34286d6662
27 changed files with 215 additions and 61 deletions
|
|
@ -11,6 +11,7 @@
|
|||
#include <linux/completion.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/gfs2_ondisk.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/crc32.h>
|
||||
|
||||
#include "gfs2.h"
|
||||
|
|
@ -34,15 +35,23 @@
|
|||
|
||||
static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
|
||||
{
|
||||
struct dentry *parent = dget_parent(dentry);
|
||||
struct gfs2_sbd *sdp = GFS2_SB(parent->d_inode);
|
||||
struct gfs2_inode *dip = GFS2_I(parent->d_inode);
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct dentry *parent;
|
||||
struct gfs2_sbd *sdp;
|
||||
struct gfs2_inode *dip;
|
||||
struct inode *inode;
|
||||
struct gfs2_holder d_gh;
|
||||
struct gfs2_inode *ip = NULL;
|
||||
int error;
|
||||
int had_lock = 0;
|
||||
|
||||
if (nd->flags & LOOKUP_RCU)
|
||||
return -ECHILD;
|
||||
|
||||
parent = dget_parent(dentry);
|
||||
sdp = GFS2_SB(parent->d_inode);
|
||||
dip = GFS2_I(parent->d_inode);
|
||||
inode = dentry->d_inode;
|
||||
|
||||
if (inode) {
|
||||
if (is_bad_inode(inode))
|
||||
goto invalid;
|
||||
|
|
|
|||
Loading…
Reference in a new issue