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

Commit 6fa67e70 authored by Al Viro's avatar Al Viro
Browse files

get rid of 'parent' argument of ->d_compare()



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent d3fe1985
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ prototypes:
	int (*d_revalidate)(struct dentry *, unsigned int);
	int (*d_weak_revalidate)(struct dentry *, unsigned int);
	int (*d_hash)(const struct dentry *, struct qstr *);
	int (*d_compare)(const struct dentry *, const struct dentry *,
	int (*d_compare)(const struct dentry *,
			unsigned int, const char *, const struct qstr *);
	int (*d_delete)(struct dentry *);
	int (*d_init)(struct dentry *);
+7 −0
Original line number Diff line number Diff line
@@ -585,3 +585,10 @@ in your dentry operations instead.
	in the instances.  Rationale: !@#!@# security_d_instantiate() needs to be
	called before we attach dentry to inode and !@#!@##!@$!$#!@#$!@$!@$ smack
	->d_instantiate() uses not just ->getxattr() but ->setxattr() as well.
--
[mandatory]
	->d_compare() doesn't get parent as a separate argument anymore.  If you
	used it for finding the struct super_block involved, dentry->d_sb will
	work just as well; if it's something more complicated, use dentry->d_parent.
	Just be careful not to assume that fetching it more than once will yield
	the same value - in RCU mode it could change under you.
+1 −1
Original line number Diff line number Diff line
@@ -931,7 +931,7 @@ struct dentry_operations {
	int (*d_revalidate)(struct dentry *, unsigned int);
	int (*d_weak_revalidate)(struct dentry *, unsigned int);
	int (*d_hash)(const struct dentry *, struct qstr *);
	int (*d_compare)(const struct dentry *, const struct dentry *,
	int (*d_compare)(const struct dentry *,
			unsigned int, const char *, const struct qstr *);
	int (*d_delete)(const struct dentry *);
	int (*d_init)(struct dentry *);
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ static void ll_release(struct dentry *de)
 * INVALID) so d_lookup() matches it, but we have no lock on it (so
 * lock_match() fails) and we spin around real_lookup().
 */
static int ll_dcompare(const struct dentry *parent, const struct dentry *dentry,
static int ll_dcompare(const struct dentry *dentry,
		       unsigned int len, const char *str,
		       const struct qstr *name)
{
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ adfs_hash(const struct dentry *parent, struct qstr *qstr)
 * requirements of the underlying filesystem.
 */
static int
adfs_compare(const struct dentry *parent, const struct dentry *dentry,
adfs_compare(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name)
{
	int i;
Loading