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

Commit ce23e640 authored by Al Viro's avatar Al Viro
Browse files

->getxattr(): pass dentry and inode as separate arguments



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent b296821a
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -525,3 +525,9 @@ in your dentry operations instead.
	set_delayed_call() where it used to set *cookie.
	set_delayed_call() where it used to set *cookie.
	->put_link() is gone - just give the destructor to set_delayed_call()
	->put_link() is gone - just give the destructor to set_delayed_call()
	in ->get_link().
	in ->get_link().
--
[mandatory]
	->getxattr() and xattr_handler.get() get dentry and inode passed separately.
	dentry might be yet to be attached to inode, so do _not_ use its ->d_inode
	in the instances.  Rationale: !@#!@# security_d_instantiate() needs to be
	called before we attach dentry to inode.
+2 −2
Original line number Original line Diff line number Diff line
@@ -1042,8 +1042,8 @@ static inline __u64 ll_file_maxbytes(struct inode *inode)
/* llite/xattr.c */
/* llite/xattr.c */
int ll_setxattr(struct dentry *dentry, const char *name,
int ll_setxattr(struct dentry *dentry, const char *name,
		const void *value, size_t size, int flags);
		const void *value, size_t size, int flags);
ssize_t ll_getxattr(struct dentry *dentry, const char *name,
ssize_t ll_getxattr(struct dentry *dentry, struct inode *inode,
		    void *buffer, size_t size);
		    const char *name, void *buffer, size_t size);
ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size);
ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size);
int ll_removexattr(struct dentry *dentry, const char *name);
int ll_removexattr(struct dentry *dentry, const char *name);


+2 −4
Original line number Original line Diff line number Diff line
@@ -451,11 +451,9 @@ int ll_getxattr_common(struct inode *inode, const char *name,
	return rc;
	return rc;
}
}


ssize_t ll_getxattr(struct dentry *dentry, const char *name,
ssize_t ll_getxattr(struct dentry *dentry, struct inode *inode,
		    void *buffer, size_t size)
		    const char *name, void *buffer, size_t size)
{
{
	struct inode *inode = d_inode(dentry);

	LASSERT(inode);
	LASSERT(inode);
	LASSERT(name);
	LASSERT(name);


+2 −2
Original line number Original line Diff line number Diff line
@@ -106,8 +106,8 @@ static int bad_inode_setxattr(struct dentry *dentry, const char *name,
	return -EIO;
	return -EIO;
}
}


static ssize_t bad_inode_getxattr(struct dentry *dentry, const char *name,
static ssize_t bad_inode_getxattr(struct dentry *dentry, struct inode *inode,
			void *buffer, size_t size)
			const char *name, void *buffer, size_t size)
{
{
	return -EIO;
	return -EIO;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -795,7 +795,7 @@ extern int ceph_setxattr(struct dentry *, const char *, const void *,
int __ceph_setxattr(struct dentry *, const char *, const void *, size_t, int);
int __ceph_setxattr(struct dentry *, const char *, const void *, size_t, int);
ssize_t __ceph_getxattr(struct inode *, const char *, void *, size_t);
ssize_t __ceph_getxattr(struct inode *, const char *, void *, size_t);
int __ceph_removexattr(struct dentry *, const char *);
int __ceph_removexattr(struct dentry *, const char *);
extern ssize_t ceph_getxattr(struct dentry *, const char *, void *, size_t);
extern ssize_t ceph_getxattr(struct dentry *, struct inode *, const char *, void *, size_t);
extern ssize_t ceph_listxattr(struct dentry *, char *, size_t);
extern ssize_t ceph_listxattr(struct dentry *, char *, size_t);
extern int ceph_removexattr(struct dentry *, const char *);
extern int ceph_removexattr(struct dentry *, const char *);
extern void __ceph_build_xattrs_blob(struct ceph_inode_info *ci);
extern void __ceph_build_xattrs_blob(struct ceph_inode_info *ci);
Loading