Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4afcc10a authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  fs/dcache: allow d_obtain_alias() to return unhashed dentries
  Check for immutable/append flag in fallocate path
  sysctl: the include of rcupdate.h is only needed in the kernel
  fat: fix d_revalidate oopsen on NFS exports
  jfs: fix d_revalidate oopsen on NFS exports
  ocfs2: fix d_revalidate oopsen on NFS exports
  gfs2: fix d_revalidate oopsen on NFS exports
  fuse: fix d_revalidate oopsen on NFS exports
  ceph: fix d_revalidate oopsen on NFS exports
  reiserfs xattr ->d_revalidate() shouldn't care about RCU
  /proc/self is never going to be invalidated...
parents b5562c9a d891eedb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -993,7 +993,7 @@ static int ceph_d_revalidate(struct dentry *dentry, struct nameidata *nd)
{
	struct inode *dir;

	if (nd->flags & LOOKUP_RCU)
	if (nd && nd->flags & LOOKUP_RCU)
		return -ECHILD;

	dir = dentry->d_parent->d_inode;
+24 −2
Original line number Diff line number Diff line
@@ -1523,6 +1523,28 @@ struct dentry * d_alloc_root(struct inode * root_inode)
}
EXPORT_SYMBOL(d_alloc_root);

static struct dentry * __d_find_any_alias(struct inode *inode)
{
	struct dentry *alias;

	if (list_empty(&inode->i_dentry))
		return NULL;
	alias = list_first_entry(&inode->i_dentry, struct dentry, d_alias);
	__dget(alias);
	return alias;
}

static struct dentry * d_find_any_alias(struct inode *inode)
{
	struct dentry *de;

	spin_lock(&inode->i_lock);
	de = __d_find_any_alias(inode);
	spin_unlock(&inode->i_lock);
	return de;
}


/**
 * d_obtain_alias - find or allocate a dentry for a given inode
 * @inode: inode to allocate the dentry for
@@ -1552,7 +1574,7 @@ struct dentry *d_obtain_alias(struct inode *inode)
	if (IS_ERR(inode))
		return ERR_CAST(inode);

	res = d_find_alias(inode);
	res = d_find_any_alias(inode);
	if (res)
		goto out_iput;

@@ -1565,7 +1587,7 @@ struct dentry *d_obtain_alias(struct inode *inode)


	spin_lock(&inode->i_lock);
	res = __d_find_alias(inode, 0);
	res = __d_find_any_alias(inode);
	if (res) {
		spin_unlock(&inode->i_lock);
		dput(tmp);
+2 −2
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ static int vfat_revalidate_shortname(struct dentry *dentry)

static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)
{
	if (nd->flags & LOOKUP_RCU)
	if (nd && nd->flags & LOOKUP_RCU)
		return -ECHILD;

	/* This is not negative dentry. Always valid. */
@@ -54,7 +54,7 @@ static int vfat_revalidate(struct dentry *dentry, struct nameidata *nd)

static int vfat_revalidate_ci(struct dentry *dentry, struct nameidata *nd)
{
	if (nd->flags & LOOKUP_RCU)
	if (nd && nd->flags & LOOKUP_RCU)
		return -ECHILD;

	/*
+1 −1
Original line number Diff line number Diff line
@@ -158,7 +158,7 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
{
	struct inode *inode;

	if (nd->flags & LOOKUP_RCU)
	if (nd && nd->flags & LOOKUP_RCU)
		return -ECHILD;

	inode = entry->d_inode;
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ static int gfs2_drevalidate(struct dentry *dentry, struct nameidata *nd)
	int error;
	int had_lock = 0;

	if (nd->flags & LOOKUP_RCU)
	if (nd && nd->flags & LOOKUP_RCU)
		return -ECHILD;

	parent = dget_parent(dentry);
Loading