diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-28 13:07:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-28 13:07:48 -0400 |
commit | 89ad6a6173127e5d31bea7a4a45ec23fa5bf4a17 (patch) | |
tree | 6feb3d663ee48b790a0be2420647e43bc20c31ad /include/linux | |
parent | aa36c7bf987dfa5597c0f7c46f8fca46b2dd33d2 (diff) | |
parent | 49837a80b38b79a7c06217b2c40842aeb6fa13b9 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
remove detritus left by "mm: make read_cache_page synchronous"
fix fs/sysv s_dirt handling
fat: convert to use the new truncate convention.
ext2: convert to use the new truncate convention.
tmpfs: convert to use the new truncate convention
fs: convert simple fs to new truncate
kill spurious reference to vmtruncate
fs: introduce new truncate sequence
fs/super: fix kernel-doc warning
fs/minix: bugfix, number of indirect block ptrs per block depends on block size
rename the generic fsync implementations
drop unused dentry argument to ->fsync
fs: Add missing mutex_unlock
Fix racy use of anon_inode_getfd() in perf_event.c
get rid of the magic around f_count in aio
VFS: fix recent breakage of FS_REVAL_DOT
Revert "anon_inode: set S_IFREG on the anon_inode"
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/buffer_head.h | 11 | ||||
-rw-r--r-- | include/linux/ext3_fs.h | 2 | ||||
-rw-r--r-- | include/linux/fb.h | 5 | ||||
-rw-r--r-- | include/linux/file.h | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 36 |
5 files changed, 43 insertions, 12 deletions
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 16ed0284d780..1b9ba193b789 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -203,6 +203,9 @@ int block_write_full_page_endio(struct page *page, get_block_t *get_block, | |||
203 | int block_read_full_page(struct page*, get_block_t*); | 203 | int block_read_full_page(struct page*, get_block_t*); |
204 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, | 204 | int block_is_partially_uptodate(struct page *page, read_descriptor_t *desc, |
205 | unsigned long from); | 205 | unsigned long from); |
206 | int block_write_begin_newtrunc(struct file *, struct address_space *, | ||
207 | loff_t, unsigned, unsigned, | ||
208 | struct page **, void **, get_block_t*); | ||
206 | int block_write_begin(struct file *, struct address_space *, | 209 | int block_write_begin(struct file *, struct address_space *, |
207 | loff_t, unsigned, unsigned, | 210 | loff_t, unsigned, unsigned, |
208 | struct page **, void **, get_block_t*); | 211 | struct page **, void **, get_block_t*); |
@@ -214,6 +217,9 @@ int generic_write_end(struct file *, struct address_space *, | |||
214 | struct page *, void *); | 217 | struct page *, void *); |
215 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); | 218 | void page_zero_new_buffers(struct page *page, unsigned from, unsigned to); |
216 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); | 219 | int block_prepare_write(struct page*, unsigned, unsigned, get_block_t*); |
220 | int cont_write_begin_newtrunc(struct file *, struct address_space *, loff_t, | ||
221 | unsigned, unsigned, struct page **, void **, | ||
222 | get_block_t *, loff_t *); | ||
217 | int cont_write_begin(struct file *, struct address_space *, loff_t, | 223 | int cont_write_begin(struct file *, struct address_space *, loff_t, |
218 | unsigned, unsigned, struct page **, void **, | 224 | unsigned, unsigned, struct page **, void **, |
219 | get_block_t *, loff_t *); | 225 | get_block_t *, loff_t *); |
@@ -224,7 +230,10 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf, | |||
224 | void block_sync_page(struct page *); | 230 | void block_sync_page(struct page *); |
225 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); | 231 | sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *); |
226 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); | 232 | int block_truncate_page(struct address_space *, loff_t, get_block_t *); |
227 | int file_fsync(struct file *, struct dentry *, int); | 233 | int file_fsync(struct file *, int); |
234 | int nobh_write_begin_newtrunc(struct file *, struct address_space *, | ||
235 | loff_t, unsigned, unsigned, | ||
236 | struct page **, void **, get_block_t*); | ||
228 | int nobh_write_begin(struct file *, struct address_space *, | 237 | int nobh_write_begin(struct file *, struct address_space *, |
229 | loff_t, unsigned, unsigned, | 238 | loff_t, unsigned, unsigned, |
230 | struct page **, void **, get_block_t*); | 239 | struct page **, void **, get_block_t*); |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 5f494b465097..7fc62d4550b2 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -868,7 +868,7 @@ extern int ext3_htree_store_dirent(struct file *dir_file, __u32 hash, | |||
868 | extern void ext3_htree_free_dir_info(struct dir_private_info *p); | 868 | extern void ext3_htree_free_dir_info(struct dir_private_info *p); |
869 | 869 | ||
870 | /* fsync.c */ | 870 | /* fsync.c */ |
871 | extern int ext3_sync_file (struct file *, struct dentry *, int); | 871 | extern int ext3_sync_file(struct file *, int); |
872 | 872 | ||
873 | /* hash.c */ | 873 | /* hash.c */ |
874 | extern int ext3fs_dirhash(const char *name, int len, struct | 874 | extern int ext3fs_dirhash(const char *name, int len, struct |
diff --git a/include/linux/fb.h b/include/linux/fb.h index f3793ebc241c..907ace3a64c8 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -4,8 +4,6 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/i2c.h> | 5 | #include <linux/i2c.h> |
6 | 6 | ||
7 | struct dentry; | ||
8 | |||
9 | /* Definitions of frame buffers */ | 7 | /* Definitions of frame buffers */ |
10 | 8 | ||
11 | #define FB_MAX 32 /* sufficient for now */ | 9 | #define FB_MAX 32 /* sufficient for now */ |
@@ -1017,8 +1015,7 @@ extern void fb_deferred_io_open(struct fb_info *info, | |||
1017 | struct inode *inode, | 1015 | struct inode *inode, |
1018 | struct file *file); | 1016 | struct file *file); |
1019 | extern void fb_deferred_io_cleanup(struct fb_info *info); | 1017 | extern void fb_deferred_io_cleanup(struct fb_info *info); |
1020 | extern int fb_deferred_io_fsync(struct file *file, struct dentry *dentry, | 1018 | extern int fb_deferred_io_fsync(struct file *file, int datasync); |
1021 | int datasync); | ||
1022 | 1019 | ||
1023 | static inline bool fb_be_math(struct fb_info *info) | 1020 | static inline bool fb_be_math(struct fb_info *info) |
1024 | { | 1021 | { |
diff --git a/include/linux/file.h b/include/linux/file.h index 5555508fd517..b1e12970f617 100644 --- a/include/linux/file.h +++ b/include/linux/file.h | |||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | struct file; | 12 | struct file; |
13 | 13 | ||
14 | extern void __fput(struct file *); | ||
15 | extern void fput(struct file *); | 14 | extern void fput(struct file *); |
16 | extern void drop_file_write_access(struct file *file); | 15 | extern void drop_file_write_access(struct file *file); |
17 | 16 | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 85e823adcd4a..3428393942a6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -954,6 +954,7 @@ extern spinlock_t files_lock; | |||
954 | #define file_list_unlock() spin_unlock(&files_lock); | 954 | #define file_list_unlock() spin_unlock(&files_lock); |
955 | 955 | ||
956 | #define get_file(x) atomic_long_inc(&(x)->f_count) | 956 | #define get_file(x) atomic_long_inc(&(x)->f_count) |
957 | #define fput_atomic(x) atomic_long_add_unless(&(x)->f_count, -1, 1) | ||
957 | #define file_count(x) atomic_long_read(&(x)->f_count) | 958 | #define file_count(x) atomic_long_read(&(x)->f_count) |
958 | 959 | ||
959 | #ifdef CONFIG_DEBUG_WRITECOUNT | 960 | #ifdef CONFIG_DEBUG_WRITECOUNT |
@@ -1497,7 +1498,7 @@ struct file_operations { | |||
1497 | int (*open) (struct inode *, struct file *); | 1498 | int (*open) (struct inode *, struct file *); |
1498 | int (*flush) (struct file *, fl_owner_t id); | 1499 | int (*flush) (struct file *, fl_owner_t id); |
1499 | int (*release) (struct inode *, struct file *); | 1500 | int (*release) (struct inode *, struct file *); |
1500 | int (*fsync) (struct file *, struct dentry *, int datasync); | 1501 | int (*fsync) (struct file *, int datasync); |
1501 | int (*aio_fsync) (struct kiocb *, int datasync); | 1502 | int (*aio_fsync) (struct kiocb *, int datasync); |
1502 | int (*fasync) (int, struct file *, int); | 1503 | int (*fasync) (int, struct file *, int); |
1503 | int (*lock) (struct file *, int, struct file_lock *); | 1504 | int (*lock) (struct file *, int, struct file_lock *); |
@@ -2212,7 +2213,7 @@ extern int generic_segment_checks(const struct iovec *iov, | |||
2212 | /* fs/block_dev.c */ | 2213 | /* fs/block_dev.c */ |
2213 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, | 2214 | extern ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov, |
2214 | unsigned long nr_segs, loff_t pos); | 2215 | unsigned long nr_segs, loff_t pos); |
2215 | extern int blkdev_fsync(struct file *filp, struct dentry *dentry, int datasync); | 2216 | extern int blkdev_fsync(struct file *filp, int datasync); |
2216 | 2217 | ||
2217 | /* fs/splice.c */ | 2218 | /* fs/splice.c */ |
2218 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, | 2219 | extern ssize_t generic_file_splice_read(struct file *, loff_t *, |
@@ -2256,6 +2257,10 @@ typedef void (dio_submit_t)(int rw, struct bio *bio, struct inode *inode, | |||
2256 | loff_t file_offset); | 2257 | loff_t file_offset); |
2257 | void dio_end_io(struct bio *bio, int error); | 2258 | void dio_end_io(struct bio *bio, int error); |
2258 | 2259 | ||
2260 | ssize_t __blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, struct inode *inode, | ||
2261 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | ||
2262 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | ||
2263 | dio_submit_t submit_io, int lock_type); | ||
2259 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 2264 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
2260 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 2265 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
2261 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, | 2266 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
@@ -2269,6 +2274,24 @@ enum { | |||
2269 | DIO_SKIP_HOLES = 0x02, | 2274 | DIO_SKIP_HOLES = 0x02, |
2270 | }; | 2275 | }; |
2271 | 2276 | ||
2277 | static inline ssize_t blockdev_direct_IO_newtrunc(int rw, struct kiocb *iocb, | ||
2278 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | ||
2279 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | ||
2280 | dio_iodone_t end_io) | ||
2281 | { | ||
2282 | return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, | ||
2283 | nr_segs, get_block, end_io, NULL, | ||
2284 | DIO_LOCKING | DIO_SKIP_HOLES); | ||
2285 | } | ||
2286 | |||
2287 | static inline ssize_t blockdev_direct_IO_no_locking_newtrunc(int rw, struct kiocb *iocb, | ||
2288 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | ||
2289 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | ||
2290 | dio_iodone_t end_io) | ||
2291 | { | ||
2292 | return __blockdev_direct_IO_newtrunc(rw, iocb, inode, bdev, iov, offset, | ||
2293 | nr_segs, get_block, end_io, NULL, 0); | ||
2294 | } | ||
2272 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | 2295 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, |
2273 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 2296 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
2274 | loff_t offset, unsigned long nr_segs, get_block_t get_block, | 2297 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
@@ -2341,13 +2364,15 @@ extern int dcache_dir_open(struct inode *, struct file *); | |||
2341 | extern int dcache_dir_close(struct inode *, struct file *); | 2364 | extern int dcache_dir_close(struct inode *, struct file *); |
2342 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); | 2365 | extern loff_t dcache_dir_lseek(struct file *, loff_t, int); |
2343 | extern int dcache_readdir(struct file *, void *, filldir_t); | 2366 | extern int dcache_readdir(struct file *, void *, filldir_t); |
2367 | extern int simple_setattr(struct dentry *, struct iattr *); | ||
2344 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 2368 | extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
2345 | extern int simple_statfs(struct dentry *, struct kstatfs *); | 2369 | extern int simple_statfs(struct dentry *, struct kstatfs *); |
2346 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); | 2370 | extern int simple_link(struct dentry *, struct inode *, struct dentry *); |
2347 | extern int simple_unlink(struct inode *, struct dentry *); | 2371 | extern int simple_unlink(struct inode *, struct dentry *); |
2348 | extern int simple_rmdir(struct inode *, struct dentry *); | 2372 | extern int simple_rmdir(struct inode *, struct dentry *); |
2349 | extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); | 2373 | extern int simple_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); |
2350 | extern int simple_sync_file(struct file *, struct dentry *, int); | 2374 | extern int simple_setsize(struct inode *, loff_t); |
2375 | extern int noop_fsync(struct file *, int); | ||
2351 | extern int simple_empty(struct dentry *); | 2376 | extern int simple_empty(struct dentry *); |
2352 | extern int simple_readpage(struct file *file, struct page *page); | 2377 | extern int simple_readpage(struct file *file, struct page *page); |
2353 | extern int simple_write_begin(struct file *file, struct address_space *mapping, | 2378 | extern int simple_write_begin(struct file *file, struct address_space *mapping, |
@@ -2372,7 +2397,7 @@ extern ssize_t simple_read_from_buffer(void __user *to, size_t count, | |||
2372 | extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, | 2397 | extern ssize_t simple_write_to_buffer(void *to, size_t available, loff_t *ppos, |
2373 | const void __user *from, size_t count); | 2398 | const void __user *from, size_t count); |
2374 | 2399 | ||
2375 | extern int simple_fsync(struct file *, struct dentry *, int); | 2400 | extern int generic_file_fsync(struct file *, int); |
2376 | 2401 | ||
2377 | #ifdef CONFIG_MIGRATION | 2402 | #ifdef CONFIG_MIGRATION |
2378 | extern int buffer_migrate_page(struct address_space *, | 2403 | extern int buffer_migrate_page(struct address_space *, |
@@ -2383,7 +2408,8 @@ extern int buffer_migrate_page(struct address_space *, | |||
2383 | 2408 | ||
2384 | extern int inode_change_ok(const struct inode *, struct iattr *); | 2409 | extern int inode_change_ok(const struct inode *, struct iattr *); |
2385 | extern int inode_newsize_ok(const struct inode *, loff_t offset); | 2410 | extern int inode_newsize_ok(const struct inode *, loff_t offset); |
2386 | extern int __must_check inode_setattr(struct inode *, struct iattr *); | 2411 | extern int __must_check inode_setattr(struct inode *, const struct iattr *); |
2412 | extern void generic_setattr(struct inode *inode, const struct iattr *attr); | ||
2387 | 2413 | ||
2388 | extern void file_update_time(struct file *file); | 2414 | extern void file_update_time(struct file *file); |
2389 | 2415 | ||