git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes
[pandora-kernel.git]
/
fs
/
btrfs
/
inode.c
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index
3601f0a
..
caa26ab
100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-4079,13
+4079,7
@@
static int btrfs_dentry_delete(const struct dentry *dentry)
static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{
static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{
- struct inode *inode;
-
- inode = btrfs_lookup_dentry(dir, dentry);
- if (IS_ERR(inode))
- return ERR_CAST(inode);
-
- return d_splice_alias(inode, dentry);
+ return d_splice_alias(btrfs_lookup_dentry(dir, dentry), dentry);
}
unsigned char btrfs_filetype_table[] = {
}
unsigned char btrfs_filetype_table[] = {
@@
-4473,7
+4467,7
@@
static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
inode->i_generation = BTRFS_I(inode)->generation;
btrfs_set_inode_space_info(root, inode);
inode->i_generation = BTRFS_I(inode)->generation;
btrfs_set_inode_space_info(root, inode);
- if (
mode & S_IFDIR
)
+ if (
S_ISDIR(mode)
)
owner = 0;
else
owner = 1;
owner = 0;
else
owner = 1;
@@
-4518,7
+4512,7
@@
static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
btrfs_inherit_iflags(inode, dir);
btrfs_inherit_iflags(inode, dir);
- if (
(mode & S_IFREG
)) {
+ if (
S_ISREG(mode
)) {
if (btrfs_test_opt(root, NODATASUM))
BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM;
if (btrfs_test_opt(root, NODATACOW) ||
if (btrfs_test_opt(root, NODATASUM))
BTRFS_I(inode)->flags |= BTRFS_INODE_NODATASUM;
if (btrfs_test_opt(root, NODATACOW) ||
@@
-4772,11
+4766,10
@@
static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
if (err) {
drop_inode = 1;
} else {
if (err) {
drop_inode = 1;
} else {
- struct dentry *parent = d
get_parent(dentry)
;
+ struct dentry *parent = d
entry->d_parent
;
err = btrfs_update_inode(trans, root, inode);
BUG_ON(err);
btrfs_log_new_name(trans, inode, NULL, parent);
err = btrfs_update_inode(trans, root, inode);
BUG_ON(err);
btrfs_log_new_name(trans, inode, NULL, parent);
- dput(parent);
}
nr = trans->blocks_used;
}
nr = trans->blocks_used;
@@
-6900,7
+6893,7
@@
static int btrfs_getattr(struct vfsmount *mnt,
{
struct inode *inode = dentry->d_inode;
generic_fillattr(inode, stat);
{
struct inode *inode = dentry->d_inode;
generic_fillattr(inode, stat);
- stat->dev = BTRFS_I(inode)->root->anon_
super.s_
dev;
+ stat->dev = BTRFS_I(inode)->root->anon_dev;
stat->blksize = PAGE_CACHE_SIZE;
stat->blocks = (inode_get_bytes(inode) +
BTRFS_I(inode)->delalloc_bytes) >> 9;
stat->blksize = PAGE_CACHE_SIZE;
stat->blocks = (inode_get_bytes(inode) +
BTRFS_I(inode)->delalloc_bytes) >> 9;
@@
-7068,9
+7061,8
@@
static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
BUG_ON(ret);
if (old_ino != BTRFS_FIRST_FREE_OBJECTID) {
BUG_ON(ret);
if (old_ino != BTRFS_FIRST_FREE_OBJECTID) {
- struct dentry *parent =
dget_parent(new_dentry)
;
+ struct dentry *parent =
new_dentry->d_parent
;
btrfs_log_new_name(trans, old_inode, old_dir, parent);
btrfs_log_new_name(trans, old_inode, old_dir, parent);
- dput(parent);
btrfs_end_log_trans(root);
}
out_fail:
btrfs_end_log_trans(root);
}
out_fail:
@@
-7331,7
+7323,7
@@
static int btrfs_set_page_dirty(struct page *page)
return __set_page_dirty_nobuffers(page);
}
return __set_page_dirty_nobuffers(page);
}
-static int btrfs_permission(struct inode *inode, int mask
, unsigned int flags
)
+static int btrfs_permission(struct inode *inode, int mask)
{
struct btrfs_root *root = BTRFS_I(inode)->root;
{
struct btrfs_root *root = BTRFS_I(inode)->root;
@@
-7339,7
+7331,7
@@
static int btrfs_permission(struct inode *inode, int mask, unsigned int flags)
return -EROFS;
if ((BTRFS_I(inode)->flags & BTRFS_INODE_READONLY) && (mask & MAY_WRITE))
return -EACCES;
return -EROFS;
if ((BTRFS_I(inode)->flags & BTRFS_INODE_READONLY) && (mask & MAY_WRITE))
return -EACCES;
- return generic_permission(inode, mask
, flags, btrfs_check_acl
);
+ return generic_permission(inode, mask);
}
static const struct inode_operations btrfs_dir_inode_operations = {
}
static const struct inode_operations btrfs_dir_inode_operations = {
@@
-7359,10
+7351,12
@@
static const struct inode_operations btrfs_dir_inode_operations = {
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
.permission = btrfs_permission,
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
.permission = btrfs_permission,
+ .get_acl = btrfs_get_acl,
};
static const struct inode_operations btrfs_dir_ro_inode_operations = {
.lookup = btrfs_lookup,
.permission = btrfs_permission,
};
static const struct inode_operations btrfs_dir_ro_inode_operations = {
.lookup = btrfs_lookup,
.permission = btrfs_permission,
+ .get_acl = btrfs_get_acl,
};
static const struct file_operations btrfs_dir_file_operations = {
};
static const struct file_operations btrfs_dir_file_operations = {
@@
-7431,6
+7425,7
@@
static const struct inode_operations btrfs_file_inode_operations = {
.removexattr = btrfs_removexattr,
.permission = btrfs_permission,
.fiemap = btrfs_fiemap,
.removexattr = btrfs_removexattr,
.permission = btrfs_permission,
.fiemap = btrfs_fiemap,
+ .get_acl = btrfs_get_acl,
};
static const struct inode_operations btrfs_special_inode_operations = {
.getattr = btrfs_getattr,
};
static const struct inode_operations btrfs_special_inode_operations = {
.getattr = btrfs_getattr,
@@
-7440,6
+7435,7
@@
static const struct inode_operations btrfs_special_inode_operations = {
.getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
.getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
+ .get_acl = btrfs_get_acl,
};
static const struct inode_operations btrfs_symlink_inode_operations = {
.readlink = generic_readlink,
};
static const struct inode_operations btrfs_symlink_inode_operations = {
.readlink = generic_readlink,
@@
-7451,6
+7447,7
@@
static const struct inode_operations btrfs_symlink_inode_operations = {
.getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
.getxattr = btrfs_getxattr,
.listxattr = btrfs_listxattr,
.removexattr = btrfs_removexattr,
+ .get_acl = btrfs_get_acl,
};
const struct dentry_operations btrfs_dentry_operations = {
};
const struct dentry_operations btrfs_dentry_operations = {