aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/xattr.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:16:03 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commit6099afe88fe64b2f47c43a8a71c13be3a416bbf7 (patch)
treebc53d1311f7338758f22d6a676e3f80376042284 /fs/btrfs/xattr.c
parentaec7477b3b0e8ec93f6d274f25ba40b0665134d4 (diff)
Btrfs: Remove unused xattr code
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/xattr.c')
-rw-r--r--fs/btrfs/xattr.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
index 3e9eb91c3c89..6730b5958844 100644
--- a/fs/btrfs/xattr.c
+++ b/fs/btrfs/xattr.c
@@ -379,57 +379,6 @@ err:
379} 379}
380 380
381/* 381/*
382 * delete all the xattrs associated with the inode.
383 */
384int btrfs_delete_xattrs(struct btrfs_trans_handle *trans,
385 struct btrfs_root *root, struct inode *inode)
386{
387 struct btrfs_path *path;
388 struct btrfs_key key, found_key;
389 struct btrfs_item *item;
390 struct extent_buffer *leaf;
391 int ret;
392
393 path = btrfs_alloc_path();
394 if (!path)
395 return -ENOMEM;
396 path->reada = -1;
397 key.objectid = inode->i_ino;
398 btrfs_set_key_type(&key, BTRFS_XATTR_ITEM_KEY);
399 key.offset = (u64)-1;
400
401 while(1) {
402 /* look for our next xattr */
403 ret = btrfs_search_slot(trans, root, &key, path, -1, 1);
404 if (ret < 0)
405 goto out;
406 BUG_ON(ret == 0);
407
408 if (path->slots[0] == 0)
409 break;
410
411 path->slots[0]--;
412 leaf = path->nodes[0];
413 item = btrfs_item_nr(leaf, path->slots[0]);
414 btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]);
415
416 if (found_key.objectid != key.objectid)
417 break;
418 if (btrfs_key_type(&found_key) != BTRFS_XATTR_ITEM_KEY)
419 break;
420
421 ret = btrfs_del_item(trans, root, path);
422 BUG_ON(ret);
423 btrfs_release_path(root, path);
424 }
425 ret = 0;
426out:
427 btrfs_free_path(path);
428
429 return ret;
430}
431
432/*
433 * Handler functions 382 * Handler functions
434 */ 383 */
435#define BTRFS_XATTR_SETGET_FUNCS(name, index) \ 384#define BTRFS_XATTR_SETGET_FUNCS(name, index) \