[2.6 patch] fs/ext2/xattr.c: make ext2_xattr_list static

From: Adrian Bunk
Date: Thu Jan 06 2005 - 17:54:08 EST


The patch below makes the needlessly global function ext2_xattr_list
static.


diffstat output:
fs/ext2/xattr.c | 24 ++++++++++++------------
fs/ext2/xattr.h | 7 -------
2 files changed, 12 insertions(+), 19 deletions(-)


Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.10-mm2-full/fs/ext2/xattr.h.old 2005-01-06 23:17:14.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/ext2/xattr.h 2005-01-06 23:17:27.000000000 +0100
@@ -66,7 +66,6 @@
extern ssize_t ext2_listxattr(struct dentry *, char *, size_t);

extern int ext2_xattr_get(struct inode *, int, const char *, void *, size_t);
-extern int ext2_xattr_list(struct inode *, char *, size_t);
extern int ext2_xattr_set(struct inode *, int, const char *, const void *, size_t, int);

extern void ext2_xattr_delete_inode(struct inode *);
@@ -87,12 +86,6 @@
}

static inline int
-ext2_xattr_list(struct inode *inode, char *buffer, size_t size)
-{
- return -EOPNOTSUPP;
-}
-
-static inline int
ext2_xattr_set(struct inode *inode, int name_index, const char *name,
const void *value, size_t size, int flags)
{
--- linux-2.6.10-mm2-full/fs/ext2/xattr.c.old 2005-01-06 23:17:35.000000000 +0100
+++ linux-2.6.10-mm2-full/fs/ext2/xattr.c 2005-01-06 23:18:22.000000000 +0100
@@ -137,17 +137,6 @@
}

/*
- * Inode operation listxattr()
- *
- * dentry->d_inode->i_sem: don't care
- */
-ssize_t
-ext2_listxattr(struct dentry *dentry, char *buffer, size_t size)
-{
- return ext2_xattr_list(dentry->d_inode, buffer, size);
-}
-
-/*
* ext2_xattr_get()
*
* Copy an extended attribute into the buffer
@@ -260,7 +249,7 @@
* Returns a negative error number on failure, or the number of bytes
* used / required on success.
*/
-int
+static int
ext2_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
{
struct buffer_head *bh = NULL;
@@ -335,6 +324,17 @@
}

/*
+ * Inode operation listxattr()
+ *
+ * dentry->d_inode->i_sem: don't care
+ */
+ssize_t
+ext2_listxattr(struct dentry *dentry, char *buffer, size_t size)
+{
+ return ext2_xattr_list(dentry->d_inode, buffer, size);
+}
+
+/*
* If the EXT2_FEATURE_COMPAT_EXT_ATTR feature of this file system is
* not set, set it.
*/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/