From: Josef Bacik <jbacik@redhat.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 4/5] updated remove useless xattr code
Date: Fri, 18 Jul 2008 12:42:50 -0400 [thread overview]
Message-ID: <20080718164250.GH15844@unused.rdu.redhat.com> (raw)
Hello,
I don't think this patch changed, but I already said patch blah/5, so I have to
include this or it will screw up my numbering :). Thanks,
Josef
diff -r 870370c6975e ctree.h
--- a/ctree.h Wed Jul 09 22:38:43 2008 -0400
+++ b/ctree.h Thu Jul 10 17:35:44 2008 -0400
@@ -1663,8 +1663,7 @@ void btrfs_sysfs_del_super(struct btrfs_
/* xattr.c */
ssize_t btrfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
-int btrfs_delete_xattrs(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct inode *inode);
+
/* super.c */
u64 btrfs_parse_size(char *str);
int btrfs_parse_options(struct btrfs_root *root, char *options);
diff -r 870370c6975e xattr.c
--- a/xattr.c Wed Jul 09 22:38:43 2008 -0400
+++ b/xattr.c Thu Jul 10 17:35:44 2008 -0400
@@ -385,57 +385,6 @@ err:
}
/*
- * delete all the xattrs associated with the inode.
- */
-int btrfs_delete_xattrs(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct inode *inode)
-{
- struct btrfs_path *path;
- struct btrfs_key key, found_key;
- struct btrfs_item *item;
- struct extent_buffer *leaf;
- int ret;
-
- path = btrfs_alloc_path();
- if (!path)
- return -ENOMEM;
- path->reada = -1;
- key.objectid = inode->i_ino;
- btrfs_set_key_type(&key, BTRFS_XATTR_ITEM_KEY);
- key.offset = (u64)-1;
-
- while(1) {
- /* look for our next xattr */
- ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
- if (ret < 0)
- goto out;
- BUG_ON(ret == 0);
-
- if (path->slots[0] == 0)
- break;
-
- path->slots[0]--;
- leaf = path->nodes[0];
- item = btrfs_item_nr(leaf, path->slots[0]);
- btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
-
- if (found_key.objectid != key.objectid)
- break;
- if (btrfs_key_type(&found_key) != BTRFS_XATTR_ITEM_KEY)
- break;
-
- ret = btrfs_del_item(trans, root, path);
- BUG_ON(ret);
- btrfs_release_path(root, path);
- }
- ret = 0;
-out:
- btrfs_free_path(path);
-
- return ret;
-}
-
-/*
* Handler functions
*/
#define BTRFS_XATTR_SETGET_FUNCS(name, index) \
reply other threads:[~2008-07-18 16:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080718164250.GH15844@unused.rdu.redhat.com \
--to=jbacik@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox