Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128619
b: refs/heads/master
c: fb4bc1e
h: refs/heads/master
i:
  128617: 8a57d05
  128615: 806b510
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent 148f3b1 commit 790aca3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: caaca38b8fdcf63a17647fddae2195b189e19e37
refs/heads/master: fb4bc1e0565a842d704846005ac0ec739e608ede
5 changes: 5 additions & 0 deletions trunk/fs/btrfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
#include <linux/posix_acl_xattr.h>
#include "ctree.h"
#include "xattr.h"
#ifndef is_owner_or_cap
#define is_owner_or_cap(inode) \
((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER))
#endif

static int btrfs_xattr_set_acl(struct inode *inode, int type,
const void *value, size_t size)
{
Expand Down
5 changes: 3 additions & 2 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2322,15 +2322,16 @@ static int create_snapshot(struct btrfs_root *root, char *name, int namelen)
ret = -ENOMEM;
goto fail_unlock;
}
pending_snapshot->name = kstrndup(name, namelen, GFP_NOFS);
pending_snapshot->name = kmalloc(namelen + 1, GFP_NOFS);
if (!pending_snapshot->name) {
ret = -ENOMEM;
kfree(pending_snapshot);
goto fail_unlock;
}
memcpy(pending_snapshot->name, name, namelen);
pending_snapshot->name[namelen] = '\0';
trans = btrfs_start_transaction(root, 1);
BUG_ON(!trans);

pending_snapshot->root = root;
list_add(&pending_snapshot->list,
&trans->transaction->pending_snapshots);
Expand Down

0 comments on commit 790aca3

Please sign in to comment.