Skip to content

Commit

Permalink
Merge branch btrfs-master into for-linus
Browse files Browse the repository at this point in the history
Conflicts:
	fs/btrfs/acl.c
  • Loading branch information
chrismason-xx committed Dec 17, 2009
2 parents b8a7f3c + 83d3c96 commit ebfee3d
Show file tree
Hide file tree
Showing 20 changed files with 1,168 additions and 916 deletions.
23 changes: 13 additions & 10 deletions fs/btrfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ static int btrfs_xattr_acl_get(struct dentry *dentry, const char *name,
/*
* Needs to be called with fs_mutex held
*/
static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
static int btrfs_set_acl(struct btrfs_trans_handle *trans,
struct inode *inode, struct posix_acl *acl, int type)
{
int ret, size = 0;
const char *name;
Expand Down Expand Up @@ -140,8 +141,7 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
goto out;
}

ret = __btrfs_setxattr(inode, name, value, size, 0);

ret = __btrfs_setxattr(trans, inode, name, value, size, 0);
out:
kfree(value);

Expand All @@ -154,7 +154,7 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name,
const void *value, size_t size, int flags, int type)
{
int ret = 0;
int ret;
struct posix_acl *acl = NULL;

if (value) {
Expand All @@ -167,7 +167,7 @@ static int btrfs_xattr_acl_set(struct dentry *dentry, const char *name,
}
}

ret = btrfs_set_acl(dentry->d_inode, acl, type);
ret = btrfs_set_acl(NULL, dentry->d_inode, acl, type);

posix_acl_release(acl);

Expand Down Expand Up @@ -196,7 +196,8 @@ int btrfs_check_acl(struct inode *inode, int mask)
* stuff has been fixed to work with that. If the locking stuff changes, we
* need to re-evaluate the acl locking stuff.
*/
int btrfs_init_acl(struct inode *inode, struct inode *dir)
int btrfs_init_acl(struct btrfs_trans_handle *trans,
struct inode *inode, struct inode *dir)
{
struct posix_acl *acl = NULL;
int ret = 0;
Expand All @@ -221,7 +222,8 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir)
mode_t mode;

if (S_ISDIR(inode->i_mode)) {
ret = btrfs_set_acl(inode, acl, ACL_TYPE_DEFAULT);
ret = btrfs_set_acl(trans, inode, acl,
ACL_TYPE_DEFAULT);
if (ret)
goto failed;
}
Expand All @@ -236,7 +238,7 @@ int btrfs_init_acl(struct inode *inode, struct inode *dir)
inode->i_mode = mode;
if (ret > 0) {
/* we need an acl */
ret = btrfs_set_acl(inode, clone,
ret = btrfs_set_acl(trans, inode, clone,
ACL_TYPE_ACCESS);
}
}
Expand Down Expand Up @@ -269,7 +271,7 @@ int btrfs_acl_chmod(struct inode *inode)

ret = posix_acl_chmod_masq(clone, inode->i_mode);
if (!ret)
ret = btrfs_set_acl(inode, clone, ACL_TYPE_ACCESS);
ret = btrfs_set_acl(NULL, inode, clone, ACL_TYPE_ACCESS);

posix_acl_release(clone);

Expand Down Expand Up @@ -297,7 +299,8 @@ int btrfs_acl_chmod(struct inode *inode)
return 0;
}

int btrfs_init_acl(struct inode *inode, struct inode *dir)
int btrfs_init_acl(struct btrfs_trans_handle *trans,
struct inode *inode, struct inode *dir)
{
return 0;
}
Expand Down
5 changes: 1 addition & 4 deletions fs/btrfs/btrfs_inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ struct btrfs_inode {
*/
struct extent_io_tree io_failure_tree;

/* held while inesrting or deleting extents from files */
struct mutex extent_mutex;

/* held while logging the inode in tree-log.c */
struct mutex log_mutex;

Expand Down Expand Up @@ -166,7 +163,7 @@ static inline struct btrfs_inode *BTRFS_I(struct inode *inode)

static inline void btrfs_i_size_write(struct inode *inode, u64 size)
{
inode->i_size = size;
i_size_write(inode, size);
BTRFS_I(inode)->disk_i_size = size;
}

Expand Down
Loading

0 comments on commit ebfee3d

Please sign in to comment.