]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
stop passing nameidata * to ->d_revalidate()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 Jun 2012 20:03:43 +0000 (16:03 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:34:14 +0000 (16:34 +0400)
Just the lookup flags.  Die, bastard, die...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
25 files changed:
Documentation/filesystems/Locking
Documentation/filesystems/porting
Documentation/filesystems/vfs.txt
fs/9p/vfs_dentry.c
fs/afs/dir.c
fs/ceph/dir.c
fs/cifs/dir.c
fs/coda/dir.c
fs/ecryptfs/dentry.c
fs/fat/namei_vfat.c
fs/fuse/dir.c
fs/gfs2/dentry.c
fs/hfs/sysdep.c
fs/jfs/namei.c
fs/namei.c
fs/ncpfs/dir.c
fs/nfs/dir.c
fs/ocfs2/dcache.c
fs/proc/base.c
fs/proc/internal.h
fs/proc/namespaces.c
fs/proc/proc_sysctl.c
fs/reiserfs/xattr.c
fs/sysfs/dir.c
include/linux/dcache.h

index 33e5243948f02e1020607dad4202de5772fe8828..52a057367f6f7b84169e6b55f7be416b9f909e69 100644 (file)
@@ -9,7 +9,7 @@ be able to use diff(1).
 
 --------------------------- dentry_operations --------------------------
 prototypes:
-       int (*d_revalidate)(struct dentry *, struct nameidata *);
+       int (*d_revalidate)(struct dentry *, unsigned int);
        int (*d_hash)(const struct dentry *, const struct inode *,
                        struct qstr *);
        int (*d_compare)(const struct dentry *, const struct inode *,
index ed9fbc23ece0ae752ab3d079f26731517bda61ad..56750b714d1edff203f2c66db5fbee2fdbb570c8 100644 (file)
@@ -431,3 +431,8 @@ release it yourself.
        d_alloc_root() is gone, along with a lot of bugs caused by code
 misusing it.  Replacement: d_make_root(inode).  The difference is,
 d_make_root() drops the reference to inode if dentry allocation fails.  
+
+--
+[mandatory]
+       The witch is dead!  Well, 1/3 of it, anyway.  ->d_revalidate() does *not*
+take struct nameidata anymore; just the flags.
index 279de219036527497d51110bab7a1f6e0c871fab..b9a406b2ed0f860378b6241011bde0e9543901e9 100644 (file)
@@ -902,7 +902,7 @@ the VFS uses a default. As of kernel 2.6.22, the following members are
 defined:
 
 struct dentry_operations {
-       int (*d_revalidate)(struct dentry *, struct nameidata *);
+       int (*d_revalidate)(struct dentry *, unsigned int);
        int (*d_hash)(const struct dentry *, const struct inode *,
                        struct qstr *);
        int (*d_compare)(const struct dentry *, const struct inode *,
@@ -921,11 +921,11 @@ struct dentry_operations {
        dcache. Most filesystems leave this as NULL, because all their
        dentries in the dcache are valid
 
-       d_revalidate may be called in rcu-walk mode (nd->flags & LOOKUP_RCU).
+       d_revalidate may be called in rcu-walk mode (flags & LOOKUP_RCU).
        If in rcu-walk mode, the filesystem must revalidate the dentry without
        blocking or storing to the dentry, d_parent and d_inode should not be
-       used without care (because they can go NULL), instead nd->inode should
-       be used.
+       used without care (because they can change and, in d_inode case, even
+       become NULL under us).
 
        If a situation is encountered that rcu-walk cannot handle, return
        -ECHILD and it will be called again in ref-walk mode.
index d529437ff44269f79cb707592a8e504bf4744cea..64600b5d0522c203ac6e8a4043462fe6e513d4aa 100644 (file)
@@ -100,13 +100,13 @@ static void v9fs_dentry_release(struct dentry *dentry)
        }
 }
 
-static int v9fs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct p9_fid *fid;
        struct inode *inode;
        struct v9fs_inode *v9inode;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;
index e22dc4b4a503e58926b89314aef6889bd26dad82..65c54ab047338e8a5fdf2200f32f6fbb8770e4b0 100644 (file)
@@ -23,7 +23,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
                                 struct nameidata *nd);
 static int afs_dir_open(struct inode *inode, struct file *file);
 static int afs_readdir(struct file *file, void *dirent, filldir_t filldir);
-static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd);
+static int afs_d_revalidate(struct dentry *dentry, unsigned int flags);
 static int afs_d_delete(const struct dentry *dentry);
 static void afs_d_release(struct dentry *dentry);
 static int afs_lookup_filldir(void *_cookie, const char *name, int nlen,
@@ -598,7 +598,7 @@ success:
  * - NOTE! the hit can be a negative hit too, so we can't assume we have an
  *   inode
  */
-static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int afs_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct afs_vnode *vnode, *dir;
        struct afs_fid uninitialized_var(fid);
@@ -607,7 +607,7 @@ static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
        void *dir_version;
        int ret;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        vnode = AFS_FS_I(dentry->d_inode);
index d42eee1c5de3842bbd8e69d12a6d8bb1bcb75147..8898eef8bca97593c7b816184eea14b8c1b80886 100644 (file)
@@ -1042,12 +1042,12 @@ static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry)
 /*
  * Check if cached dentry can be trusted.
  */
-static int ceph_d_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int ceph_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
        int valid = 0;
        struct inode *dir;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        dout("d_revalidate %p '%.*s' inode %p offset %lld\n", dentry,
@@ -1094,7 +1094,7 @@ static void ceph_d_release(struct dentry *dentry)
 }
 
 static int ceph_snapdir_d_revalidate(struct dentry *dentry,
-                                         struct nameidata *nd)
+                                         unsigned int flags)
 {
        /*
         * Eventually, we'll want to revalidate snapped metadata
index e8c53c80dbd5d5cdb6717cf8580001212473afc7..b97ff48b7df6aa8b56e252ec56075519ebbb94e6 100644 (file)
@@ -700,9 +700,9 @@ lookup_out:
 }
 
 static int
-cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
+cifs_d_revalidate(struct dentry *direntry, unsigned int flags)
 {
-       if (nd && (nd->flags & LOOKUP_RCU))
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        if (direntry->d_inode) {
@@ -731,7 +731,7 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
         * This may be nfsd (or something), anyway, we can't see the
         * intent of this. So, since this can be for creation, drop it.
         */
-       if (!nd)
+       if (!flags)
                return 0;
 
        /*
@@ -739,7 +739,7 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
         * case sensitive name which is specified by user if this is
         * for creation.
         */
-       if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
+       if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
                return 0;
 
        if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled)
index 177515829062d82aed7dcdce9bda390535804614..7f8f1a7c6d87518b878635578ac468877d06017e 100644 (file)
@@ -46,7 +46,7 @@ static int coda_rename(struct inode *old_inode, struct dentry *old_dentry,
 static int coda_readdir(struct file *file, void *buf, filldir_t filldir);
 
 /* dentry ops */
-static int coda_dentry_revalidate(struct dentry *de, struct nameidata *nd);
+static int coda_dentry_revalidate(struct dentry *de, unsigned int flags);
 static int coda_dentry_delete(const struct dentry *);
 
 /* support routines */
@@ -536,12 +536,12 @@ out:
 }
 
 /* called when a cache lookup succeeds */
-static int coda_dentry_revalidate(struct dentry *de, struct nameidata *nd)
+static int coda_dentry_revalidate(struct dentry *de, unsigned int flags)
 {
        struct inode *inode;
        struct coda_inode_info *cii;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = de->d_inode;
index 534c1d46e69ea6ebb8b860137579d301f9c35840..1b5d9af937dfc4a33015eaa154a8956857381749 100644 (file)
@@ -32,7 +32,7 @@
 /**
  * ecryptfs_d_revalidate - revalidate an ecryptfs dentry
  * @dentry: The ecryptfs dentry
- * @nd: The associated nameidata
+ * @flags: lookup flags
  *
  * Called when the VFS needs to revalidate a dentry. This
  * is called whenever a name lookup finds a dentry in the
  * Returns 1 if valid, 0 otherwise.
  *
  */
-static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int ecryptfs_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct dentry *lower_dentry;
        struct vfsmount *lower_mnt;
-       struct dentry *dentry_save = NULL;
-       struct vfsmount *vfsmount_save = NULL;
        int rc = 1;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        lower_dentry = ecryptfs_dentry_to_lower(dentry);
        lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
        if (!lower_dentry->d_op || !lower_dentry->d_op->d_revalidate)
                goto out;
-       if (nd) {
-               dentry_save = nd->path.dentry;
-               vfsmount_save = nd->path.mnt;
-               nd->path.dentry = lower_dentry;
-               nd->path.mnt = lower_mnt;
-       }
-       rc = lower_dentry->d_op->d_revalidate(lower_dentry, nd);
-       if (nd) {
-               nd->path.dentry = dentry_save;
-               nd->path.mnt = vfsmount_save;
-       }
+       rc = lower_dentry->d_op->d_revalidate(lower_dentry, flags);
        if (dentry->d_inode) {
                struct inode *lower_inode =
                        ecryptfs_inode_to_lower(dentry->d_inode);
index 98ae804f5273df49ba857f8853d83ba7503c4255..0bbdf3990060c3c1d4fee8a58b2751cd50d6f9b0 100644 (file)
@@ -41,9 +41,9 @@ static int vfat_revalidate_shortname(struct dentry *dentry)
        return ret;
 }
 
-static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int vfat_revalidate(struct dentry *dentry, unsigned int flags)
 {
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        /* This is not negative dentry. Always valid. */
@@ -52,9 +52,9 @@ static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
        return vfat_revalidate_shortname(dentry);
 }
 
-static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
+static int vfat_revalidate_ci(struct dentry *dentry, unsigned int flags)
 {
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        /*
@@ -74,7 +74,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
         * This may be nfsd (or something), anyway, we can't see the
         * intent of this. So, since this can be for creation, drop it.
         */
-       if (!nd)
+       if (!flags)
                return 0;
 
        /*
@@ -82,7 +82,7 @@ static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
         * case sensitive name which is specified by user if this is
         * for creation.
         */
-       if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
+       if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
                return 0;
 
        return vfat_revalidate_shortname(dentry);
index ccdab3ac422305667324b8fed96496e52abcc706..eba30bd9ba2b36ca7235a6b382810828d2192e0e 100644 (file)
@@ -154,7 +154,7 @@ u64 fuse_get_attr_version(struct fuse_conn *fc)
  * the lookup once more.  If the lookup results in the same inode,
  * then refresh the attributes, timeouts and mark the dentry valid.
  */
-static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
+static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)
 {
        struct inode *inode;
 
@@ -174,7 +174,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
                if (!inode)
                        return 0;
 
-               if (nd && (nd->flags & LOOKUP_RCU))
+               if (flags & LOOKUP_RCU)
                        return -ECHILD;
 
                fc = get_fuse_conn(inode);
index 0da8da2c991d30a906f954ce021f5373092298f9..4fddb3c22d258ca6da35b4e743ec80fc20ee2e08 100644 (file)
@@ -25,7 +25,7 @@
 /**
  * gfs2_drevalidate - Check directory lookup consistency
  * @dentry: the mapping to check
- * @nd:
+ * @flags: lookup flags
  *
  * Check to make sure the lookup necessary to arrive at this inode from its
  * parent is still good.
@@ -33,7 +33,7 @@
  * Returns: 1 if the dentry is ok, 0 if it isn't
  */
 
-static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
+static int gfs2_drevalidate(struct dentry *dentry, unsigned int flags)
 {
        struct dentry *parent;
        struct gfs2_sbd *sdp;
@@ -44,7 +44,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
        int error;
        int had_lock = 0;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        parent = dget_parent(dentry);
index 19cf291eb91f6325126121393ca2354204fb6c5f..91b91fd3a9013a08cc7d12d5e3934b09931b1a1e 100644 (file)
 
 /* dentry case-handling: just lowercase everything */
 
-static int hfs_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
+static int hfs_revalidate_dentry(struct dentry *dentry, unsigned int flags)
 {
        struct inode *inode;
        int diff;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;
index 07c91ca6017db03d404362e5e763fdbf90fdc2ef..f37977fb0871e01cacee4ea7b6c290b3434d5ff8 100644 (file)
@@ -1570,7 +1570,7 @@ out:
        return result;
 }
 
-static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int jfs_ci_revalidate(struct dentry *dentry, unsigned int flags)
 {
        /*
         * This is not negative dentry. Always valid.
@@ -1589,7 +1589,7 @@ static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
         * This may be nfsd (or something), anyway, we can't see the
         * intent of this. So, since this can be for creation, drop it.
         */
-       if (!nd)
+       if (!flags)
                return 0;
 
        /*
@@ -1597,7 +1597,7 @@ static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
         * case sensitive name which is specified by user if this is
         * for creation.
         */
-       if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
+       if (flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
                return 0;
        return 1;
 }
index 16256d915cb8778d898c6adb6ec758a5e700fdae..1a5707aaed36e2e1c02cd75ff3391c3941ea5225 100644 (file)
@@ -465,7 +465,7 @@ err_root:
 
 static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
-       return dentry->d_op->d_revalidate(dentry, nd);
+       return dentry->d_op->d_revalidate(dentry, nd ? nd->flags : 0);
 }
 
 /**
index aeed93a6bde0c972796b92972ec5cea58126dc75..32607f749588f56ef8cbdae2395999fde3119177 100644 (file)
@@ -72,7 +72,7 @@ const struct inode_operations ncp_dir_inode_operations =
 /*
  * Dentry operations routines
  */
-static int ncp_lookup_validate(struct dentry *, struct nameidata *);
+static int ncp_lookup_validate(struct dentry *, unsigned int);
 static int ncp_hash_dentry(const struct dentry *, const struct inode *,
                struct qstr *);
 static int ncp_compare_dentry(const struct dentry *, const struct inode *,
@@ -290,7 +290,7 @@ leave_me:;
 
 
 static int
-ncp_lookup_validate(struct dentry *dentry, struct nameidata *nd)
+ncp_lookup_validate(struct dentry *dentry, unsigned int flags)
 {
        struct ncp_server *server;
        struct dentry *parent;
@@ -302,7 +302,7 @@ ncp_lookup_validate(struct dentry *dentry, struct nameidata *nd)
        if (dentry == dentry->d_sb->s_root)
                return 1;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        parent = dget_parent(dentry);
index 71a199435ca964bf1f35aee85d02271195ba29b5..656f52e9aa2ec04d2a2f35a9395fea370dca247f 100644 (file)
@@ -1098,9 +1098,8 @@ int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry,
  * If the parent directory is seen to have changed, we throw out the
  * cached dentry and do a new lookup.
  */
-static int nfs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int nfs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
 {
-       unsigned int flags = nd->flags;
        struct inode *dir;
        struct inode *inode;
        struct dentry *parent;
@@ -1339,7 +1338,7 @@ out:
 }
 
 #ifdef CONFIG_NFS_V4
-static int nfs4_lookup_revalidate(struct dentry *, struct nameidata *);
+static int nfs4_lookup_revalidate(struct dentry *, unsigned int);
 
 const struct dentry_operations nfs4_dentry_operations = {
        .d_revalidate   = nfs4_lookup_revalidate,
@@ -1491,9 +1490,8 @@ no_open:
        return finish_no_open(file, res);
 }
 
-static int nfs4_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int nfs4_lookup_revalidate(struct dentry *dentry, unsigned int flags)
 {
-       unsigned int flags = nd->flags;
        struct dentry *parent = NULL;
        struct inode *inode;
        struct inode *dir;
@@ -1537,7 +1535,7 @@ out:
 no_open_dput:
        dput(parent);
 no_open:
-       return nfs_lookup_revalidate(dentry, nd);
+       return nfs_lookup_revalidate(dentry, flags);
 }
 
 #endif /* CONFIG_NFSV4 */
index af4488268e491af54194825e408d4c86bc7beb87..8db4b58b2e4b2e92a5e6fe42c7c71c657866c125 100644 (file)
@@ -49,14 +49,13 @@ void ocfs2_dentry_attach_gen(struct dentry *dentry)
 }
 
 
-static int ocfs2_dentry_revalidate(struct dentry *dentry,
-                                  struct nameidata *nd)
+static int ocfs2_dentry_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct inode *inode;
        int ret = 0;    /* if all else fails, just return false */
        struct ocfs2_super *osb;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;
index 437195f204e14e908bdda87ace0e8b0ce81efb21..bf749cca4cc68852b2a28e51f8a2e5dbff1e8f6d 100644 (file)
@@ -1601,13 +1601,13 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
  * made this apply to all per process world readable and executable
  * directories.
  */
-int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
+int pid_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct inode *inode;
        struct task_struct *task;
        const struct cred *cred;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;
@@ -1781,7 +1781,7 @@ static int proc_fd_link(struct dentry *dentry, struct path *path)
        return proc_fd_info(dentry->d_inode, path, NULL);
 }
 
-static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int tid_fd_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct inode *inode;
        struct task_struct *task;
@@ -1789,7 +1789,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
        struct files_struct *files;
        const struct cred *cred;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        inode = dentry->d_inode;
@@ -1868,7 +1868,7 @@ static struct dentry *proc_fd_instantiate(struct inode *dir,
        d_set_d_op(dentry, &tid_fd_dentry_operations);
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (tid_fd_revalidate(dentry, NULL))
+       if (tid_fd_revalidate(dentry, 0))
                error = NULL;
 
  out:
@@ -2003,7 +2003,7 @@ static int dname_to_vma_addr(struct dentry *dentry,
        return 0;
 }
 
-static int map_files_d_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)
 {
        unsigned long vm_start, vm_end;
        bool exact_vma_exists = false;
@@ -2013,7 +2013,7 @@ static int map_files_d_revalidate(struct dentry *dentry, struct nameidata *nd)
        struct inode *inode;
        int status = 0;
 
-       if (nd && nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        if (!capable(CAP_SYS_ADMIN)) {
@@ -2371,7 +2371,7 @@ static struct dentry *proc_fdinfo_instantiate(struct inode *dir,
        d_set_d_op(dentry, &tid_fd_dentry_operations);
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (tid_fd_revalidate(dentry, NULL))
+       if (tid_fd_revalidate(dentry, 0))
                error = NULL;
 
  out:
@@ -2430,7 +2430,7 @@ static struct dentry *proc_pident_instantiate(struct inode *dir,
        d_set_d_op(dentry, &pid_dentry_operations);
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (pid_revalidate(dentry, NULL))
+       if (pid_revalidate(dentry, 0))
                error = NULL;
 out:
        return error;
@@ -3237,7 +3237,7 @@ static struct dentry *proc_pid_instantiate(struct inode *dir,
 
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (pid_revalidate(dentry, NULL))
+       if (pid_revalidate(dentry, 0))
                error = NULL;
 out:
        return error;
@@ -3508,7 +3508,7 @@ static struct dentry *proc_task_instantiate(struct inode *dir,
 
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (pid_revalidate(dentry, NULL))
+       if (pid_revalidate(dentry, 0))
                error = NULL;
 out:
        return error;
index eca4aca5b6e227c11bb13c100deac3861b747a44..e0c2a48dab731ffe606945b0b332ace88949f64e 100644 (file)
@@ -142,7 +142,7 @@ typedef struct dentry *instantiate_t(struct inode *, struct dentry *,
 int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
        const char *name, int len,
        instantiate_t instantiate, struct task_struct *task, const void *ptr);
-int pid_revalidate(struct dentry *dentry, struct nameidata *nd);
+int pid_revalidate(struct dentry *dentry, unsigned int flags);
 struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *task);
 extern const struct dentry_operations pid_dentry_operations;
 int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat);
index 0d9e23a39e495f0d6dd0a69d0f84aaa05faef9b5..40ceb40f98534e0c151b54e5b0d8dde8b5f7d2cb 100644 (file)
@@ -56,7 +56,7 @@ static struct dentry *proc_ns_instantiate(struct inode *dir,
        d_set_d_op(dentry, &pid_dentry_operations);
        d_add(dentry, inode);
        /* Close the race of the process dying before we return the dentry */
-       if (pid_revalidate(dentry, NULL))
+       if (pid_revalidate(dentry, 0))
                error = NULL;
 out:
        return error;
index 3476bca8f7af93392539e28b14aeaf9b40c457a0..fda69fa390994eb4c47c981c3dfde7b475d02def 100644 (file)
@@ -794,9 +794,9 @@ static const struct inode_operations proc_sys_dir_operations = {
        .getattr        = proc_sys_getattr,
 };
 
-static int proc_sys_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int proc_sys_revalidate(struct dentry *dentry, unsigned int flags)
 {
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
        return !PROC_I(dentry->d_inode)->sysctl->unregistering;
 }
index 46fc1c20a6b1c65ccd72a8f18106283b01197916..e6ad8d7dea6446f1ce4b294ed6a45fcc5eeddedc 100644 (file)
@@ -942,7 +942,7 @@ int reiserfs_permission(struct inode *inode, int mask)
        return generic_permission(inode, mask);
 }
 
-static int xattr_hide_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int xattr_hide_revalidate(struct dentry *dentry, unsigned int flags)
 {
        return -EPERM;
 }
index e6bb9b2a4cbef3df52450d349a87a316844d6c8a..038e74b3af876b3c7749fdf53b58c96b5d4184e1 100644 (file)
@@ -303,12 +303,12 @@ static int sysfs_dentry_delete(const struct dentry *dentry)
        return !!(sd->s_flags & SYSFS_FLAG_REMOVED);
 }
 
-static int sysfs_dentry_revalidate(struct dentry *dentry, struct nameidata *nd)
+static int sysfs_dentry_revalidate(struct dentry *dentry, unsigned int flags)
 {
        struct sysfs_dirent *sd;
        int is_dir;
 
-       if (nd->flags & LOOKUP_RCU)
+       if (flags & LOOKUP_RCU)
                return -ECHILD;
 
        sd = dentry->d_fsdata;
index 8ca2555182042b8537829f06c3e2d9dc09965e12..caa34e50537e895a7a4b5149148f03157e253129 100644 (file)
@@ -144,7 +144,7 @@ enum dentry_d_lock_class
 };
 
 struct dentry_operations {
-       int (*d_revalidate)(struct dentry *, struct nameidata *);
+       int (*d_revalidate)(struct dentry *, unsigned int);
        int (*d_hash)(const struct dentry *, const struct inode *,
                        struct qstr *);
        int (*d_compare)(const struct dentry *, const struct inode *,