diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 11:56:33 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-07 11:56:33 -0500 |
| commit | b4a45f5fe8078bfc10837dbd5b98735058bc4698 (patch) | |
| tree | df6f13a27610a3ec7eb4a661448cd779a8f84c79 /fs/ncpfs/inode.c | |
| parent | 01539ba2a706ab7d35fc0667dff919ade7f87d63 (diff) | |
| parent | b3e19d924b6eaf2ca7d22cba99a517c5171007b6 (diff) | |
Merge branch 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin
* 'vfs-scale-working' of git://git.kernel.org/pub/scm/linux/kernel/git/npiggin/linux-npiggin: (57 commits)
fs: scale mntget/mntput
fs: rename vfsmount counter helpers
fs: implement faster dentry memcmp
fs: prefetch inode data in dcache lookup
fs: improve scalability of pseudo filesystems
fs: dcache per-inode inode alias locking
fs: dcache per-bucket dcache hash locking
bit_spinlock: add required includes
kernel: add bl_list
xfs: provide simple rcu-walk ACL implementation
btrfs: provide simple rcu-walk ACL implementation
ext2,3,4: provide simple rcu-walk ACL implementation
fs: provide simple rcu-walk generic_check_acl implementation
fs: provide rcu-walk aware permission i_ops
fs: rcu-walk aware d_revalidate method
fs: cache optimise dentry and inode for rcu-walk
fs: dcache reduce branches in lookup path
fs: dcache remove d_mounted
fs: fs_struct use seqlock
fs: rcu-walk for path lookup
...
Diffstat (limited to 'fs/ncpfs/inode.c')
| -rw-r--r-- | fs/ncpfs/inode.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c index 8fb93b604e73..9531c052d7a4 100644 --- a/fs/ncpfs/inode.c +++ b/fs/ncpfs/inode.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/vfs.h> | 29 | #include <linux/vfs.h> |
| 30 | #include <linux/mount.h> | 30 | #include <linux/mount.h> |
| 31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
| 32 | #include <linux/namei.h> | ||
| 32 | 33 | ||
| 33 | #include <linux/ncp_fs.h> | 34 | #include <linux/ncp_fs.h> |
| 34 | 35 | ||
| @@ -58,11 +59,18 @@ static struct inode *ncp_alloc_inode(struct super_block *sb) | |||
| 58 | return &ei->vfs_inode; | 59 | return &ei->vfs_inode; |
| 59 | } | 60 | } |
| 60 | 61 | ||
| 61 | static void ncp_destroy_inode(struct inode *inode) | 62 | static void ncp_i_callback(struct rcu_head *head) |
| 62 | { | 63 | { |
| 64 | struct inode *inode = container_of(head, struct inode, i_rcu); | ||
| 65 | INIT_LIST_HEAD(&inode->i_dentry); | ||
| 63 | kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); | 66 | kmem_cache_free(ncp_inode_cachep, NCP_FINFO(inode)); |
| 64 | } | 67 | } |
| 65 | 68 | ||
| 69 | static void ncp_destroy_inode(struct inode *inode) | ||
| 70 | { | ||
| 71 | call_rcu(&inode->i_rcu, ncp_i_callback); | ||
| 72 | } | ||
| 73 | |||
| 66 | static void init_once(void *foo) | 74 | static void init_once(void *foo) |
| 67 | { | 75 | { |
| 68 | struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; | 76 | struct ncp_inode_info *ei = (struct ncp_inode_info *) foo; |
| @@ -710,7 +718,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent) | |||
| 710 | sb->s_root = d_alloc_root(root_inode); | 718 | sb->s_root = d_alloc_root(root_inode); |
| 711 | if (!sb->s_root) | 719 | if (!sb->s_root) |
| 712 | goto out_no_root; | 720 | goto out_no_root; |
| 713 | sb->s_root->d_op = &ncp_root_dentry_operations; | 721 | d_set_d_op(sb->s_root, &ncp_root_dentry_operations); |
| 714 | return 0; | 722 | return 0; |
| 715 | 723 | ||
| 716 | out_no_root: | 724 | out_no_root: |
