diff options
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/btree.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/file.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 11 | ||||
-rw-r--r-- | fs/nilfs2/nilfs.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/segbuf.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/segment.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/super.c | 8 | ||||
-rw-r--r-- | fs/nilfs2/the_nilfs.c | 4 |
8 files changed, 10 insertions, 25 deletions
diff --git a/fs/nilfs2/btree.h b/fs/nilfs2/btree.h index af638d59e3bf..43c8c5b541fd 100644 --- a/fs/nilfs2/btree.h +++ b/fs/nilfs2/btree.h | |||
@@ -75,8 +75,6 @@ struct nilfs_btree_path { | |||
75 | 75 | ||
76 | extern struct kmem_cache *nilfs_btree_path_cache; | 76 | extern struct kmem_cache *nilfs_btree_path_cache; |
77 | 77 | ||
78 | int nilfs_btree_path_cache_init(void); | ||
79 | void nilfs_btree_path_cache_destroy(void); | ||
80 | int nilfs_btree_init(struct nilfs_bmap *); | 78 | int nilfs_btree_init(struct nilfs_bmap *); |
81 | int nilfs_btree_convert_and_insert(struct nilfs_bmap *, __u64, __u64, | 79 | int nilfs_btree_convert_and_insert(struct nilfs_bmap *, __u64, __u64, |
82 | const __u64 *, const __u64 *, int); | 80 | const __u64 *, const __u64 *, int); |
diff --git a/fs/nilfs2/file.c b/fs/nilfs2/file.c index 30292df443ce..c9a30d7ff6fc 100644 --- a/fs/nilfs2/file.c +++ b/fs/nilfs2/file.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include "nilfs.h" | 27 | #include "nilfs.h" |
28 | #include "segment.h" | 28 | #include "segment.h" |
29 | 29 | ||
30 | int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | 30 | int nilfs_sync_file(struct file *file, int datasync) |
31 | { | 31 | { |
32 | /* | 32 | /* |
33 | * Called from fsync() system call | 33 | * Called from fsync() system call |
@@ -37,7 +37,7 @@ int nilfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
37 | * This function should be implemented when the writeback function | 37 | * This function should be implemented when the writeback function |
38 | * will be implemented. | 38 | * will be implemented. |
39 | */ | 39 | */ |
40 | struct inode *inode = dentry->d_inode; | 40 | struct inode *inode = file->f_mapping->host; |
41 | int err; | 41 | int err; |
42 | 42 | ||
43 | if (!nilfs_inode_dirty(inode)) | 43 | if (!nilfs_inode_dirty(inode)) |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index 5e226d4b41d3..39e038ac8fcb 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -280,16 +280,7 @@ struct inode *nilfs_new_inode(struct inode *dir, int mode) | |||
280 | /* reference count of i_bh inherits from nilfs_mdt_read_block() */ | 280 | /* reference count of i_bh inherits from nilfs_mdt_read_block() */ |
281 | 281 | ||
282 | atomic_inc(&sbi->s_inodes_count); | 282 | atomic_inc(&sbi->s_inodes_count); |
283 | 283 | inode_init_owner(inode, dir, mode); | |
284 | inode->i_uid = current_fsuid(); | ||
285 | if (dir->i_mode & S_ISGID) { | ||
286 | inode->i_gid = dir->i_gid; | ||
287 | if (S_ISDIR(mode)) | ||
288 | mode |= S_ISGID; | ||
289 | } else | ||
290 | inode->i_gid = current_fsgid(); | ||
291 | |||
292 | inode->i_mode = mode; | ||
293 | inode->i_ino = ino; | 284 | inode->i_ino = ino; |
294 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 285 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
295 | 286 | ||
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index 8723e5bfd071..47d6d7928122 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -228,7 +228,7 @@ extern void nilfs_set_link(struct inode *, struct nilfs_dir_entry *, | |||
228 | struct page *, struct inode *); | 228 | struct page *, struct inode *); |
229 | 229 | ||
230 | /* file.c */ | 230 | /* file.c */ |
231 | extern int nilfs_sync_file(struct file *, struct dentry *, int); | 231 | extern int nilfs_sync_file(struct file *, int); |
232 | 232 | ||
233 | /* ioctl.c */ | 233 | /* ioctl.c */ |
234 | long nilfs_ioctl(struct file *, unsigned int, unsigned long); | 234 | long nilfs_ioctl(struct file *, unsigned int, unsigned long); |
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h index fdf1c3b6d673..85fbb66455e2 100644 --- a/fs/nilfs2/segbuf.h +++ b/fs/nilfs2/segbuf.h | |||
@@ -127,8 +127,6 @@ struct nilfs_segment_buffer { | |||
127 | 127 | ||
128 | extern struct kmem_cache *nilfs_segbuf_cachep; | 128 | extern struct kmem_cache *nilfs_segbuf_cachep; |
129 | 129 | ||
130 | int __init nilfs_init_segbuf_cache(void); | ||
131 | void nilfs_destroy_segbuf_cache(void); | ||
132 | struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *); | 130 | struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *); |
133 | void nilfs_segbuf_free(struct nilfs_segment_buffer *); | 131 | void nilfs_segbuf_free(struct nilfs_segment_buffer *); |
134 | void nilfs_segbuf_map(struct nilfs_segment_buffer *, __u64, unsigned long, | 132 | void nilfs_segbuf_map(struct nilfs_segment_buffer *, __u64, unsigned long, |
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h index dca142361ccf..01e20dbb217d 100644 --- a/fs/nilfs2/segment.h +++ b/fs/nilfs2/segment.h | |||
@@ -221,8 +221,6 @@ enum { | |||
221 | extern struct kmem_cache *nilfs_transaction_cachep; | 221 | extern struct kmem_cache *nilfs_transaction_cachep; |
222 | 222 | ||
223 | /* segment.c */ | 223 | /* segment.c */ |
224 | extern int nilfs_init_transaction_cache(void); | ||
225 | extern void nilfs_destroy_transaction_cache(void); | ||
226 | extern void nilfs_relax_pressure_in_lock(struct super_block *); | 224 | extern void nilfs_relax_pressure_in_lock(struct super_block *); |
227 | 225 | ||
228 | extern int nilfs_construct_segment(struct super_block *); | 226 | extern int nilfs_construct_segment(struct super_block *); |
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 03b34b738993..414ef68931cf 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -1130,13 +1130,13 @@ static void nilfs_segbuf_init_once(void *obj) | |||
1130 | 1130 | ||
1131 | static void nilfs_destroy_cachep(void) | 1131 | static void nilfs_destroy_cachep(void) |
1132 | { | 1132 | { |
1133 | if (nilfs_inode_cachep) | 1133 | if (nilfs_inode_cachep) |
1134 | kmem_cache_destroy(nilfs_inode_cachep); | 1134 | kmem_cache_destroy(nilfs_inode_cachep); |
1135 | if (nilfs_transaction_cachep) | 1135 | if (nilfs_transaction_cachep) |
1136 | kmem_cache_destroy(nilfs_transaction_cachep); | 1136 | kmem_cache_destroy(nilfs_transaction_cachep); |
1137 | if (nilfs_segbuf_cachep) | 1137 | if (nilfs_segbuf_cachep) |
1138 | kmem_cache_destroy(nilfs_segbuf_cachep); | 1138 | kmem_cache_destroy(nilfs_segbuf_cachep); |
1139 | if (nilfs_btree_path_cache) | 1139 | if (nilfs_btree_path_cache) |
1140 | kmem_cache_destroy(nilfs_btree_path_cache); | 1140 | kmem_cache_destroy(nilfs_btree_path_cache); |
1141 | } | 1141 | } |
1142 | 1142 | ||
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index a756168a21c2..8c1097327abc 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c | |||
@@ -674,7 +674,7 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump, | |||
674 | start * sects_per_block, | 674 | start * sects_per_block, |
675 | nblocks * sects_per_block, | 675 | nblocks * sects_per_block, |
676 | GFP_NOFS, | 676 | GFP_NOFS, |
677 | DISCARD_FL_BARRIER); | 677 | BLKDEV_IFL_BARRIER); |
678 | if (ret < 0) | 678 | if (ret < 0) |
679 | return ret; | 679 | return ret; |
680 | nblocks = 0; | 680 | nblocks = 0; |
@@ -684,7 +684,7 @@ int nilfs_discard_segments(struct the_nilfs *nilfs, __u64 *segnump, | |||
684 | ret = blkdev_issue_discard(nilfs->ns_bdev, | 684 | ret = blkdev_issue_discard(nilfs->ns_bdev, |
685 | start * sects_per_block, | 685 | start * sects_per_block, |
686 | nblocks * sects_per_block, | 686 | nblocks * sects_per_block, |
687 | GFP_NOFS, DISCARD_FL_BARRIER); | 687 | GFP_NOFS, BLKDEV_IFL_BARRIER); |
688 | return ret; | 688 | return ret; |
689 | } | 689 | } |
690 | 690 | ||