diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 6 | ||||
-rw-r--r-- | Documentation/filesystems/porting | 7 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 2 |
3 files changed, 10 insertions, 5 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 9b6ed7c9f34f..ca7e25292542 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -412,7 +412,7 @@ prototypes: | |||
412 | int (*open) (struct inode *, struct file *); | 412 | int (*open) (struct inode *, struct file *); |
413 | int (*flush) (struct file *); | 413 | int (*flush) (struct file *); |
414 | int (*release) (struct inode *, struct file *); | 414 | int (*release) (struct inode *, struct file *); |
415 | int (*fsync) (struct file *, int datasync); | 415 | int (*fsync) (struct file *, loff_t start, loff_t end, int datasync); |
416 | int (*aio_fsync) (struct kiocb *, int datasync); | 416 | int (*aio_fsync) (struct kiocb *, int datasync); |
417 | int (*fasync) (int, struct file *, int); | 417 | int (*fasync) (int, struct file *, int); |
418 | int (*lock) (struct file *, int, struct file_lock *); | 418 | int (*lock) (struct file *, int, struct file_lock *); |
@@ -438,9 +438,7 @@ prototypes: | |||
438 | 438 | ||
439 | locking rules: | 439 | locking rules: |
440 | All may block except for ->setlease. | 440 | All may block except for ->setlease. |
441 | No VFS locks held on entry except for ->fsync and ->setlease. | 441 | No VFS locks held on entry except for ->setlease. |
442 | |||
443 | ->fsync() has i_mutex on inode. | ||
444 | 442 | ||
445 | ->setlease has the file_list_lock held and must not sleep. | 443 | ->setlease has the file_list_lock held and must not sleep. |
446 | 444 | ||
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting index 6b96773e27cb..7f8861d341ea 100644 --- a/Documentation/filesystems/porting +++ b/Documentation/filesystems/porting | |||
@@ -421,3 +421,10 @@ data and there is a virtual hole at the end of the file. So if the provided | |||
421 | offset is less than i_size and SEEK_DATA is specified, return the same offset. | 421 | offset is less than i_size and SEEK_DATA is specified, return the same offset. |
422 | If the above is true for the offset and you are given SEEK_HOLE, return the end | 422 | If the above is true for the offset and you are given SEEK_HOLE, return the end |
423 | of the file. If the offset is i_size or greater return -ENXIO in either case. | 423 | of the file. If the offset is i_size or greater return -ENXIO in either case. |
424 | |||
425 | [mandatory] | ||
426 | If you have your own ->fsync() you must make sure to call | ||
427 | filemap_write_and_wait_range() so that all dirty pages are synced out properly. | ||
428 | You must also keep in mind that ->fsync() is not called with i_mutex held | ||
429 | anymore, so if you require i_mutex locking you must make sure to take it and | ||
430 | release it yourself. | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 6bf85b78cfea..eff6617c9a0f 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -777,7 +777,7 @@ struct file_operations { | |||
777 | int (*open) (struct inode *, struct file *); | 777 | int (*open) (struct inode *, struct file *); |
778 | int (*flush) (struct file *); | 778 | int (*flush) (struct file *); |
779 | int (*release) (struct inode *, struct file *); | 779 | int (*release) (struct inode *, struct file *); |
780 | int (*fsync) (struct file *, int datasync); | 780 | int (*fsync) (struct file *, loff_t, loff_t, int datasync); |
781 | int (*aio_fsync) (struct kiocb *, int datasync); | 781 | int (*aio_fsync) (struct kiocb *, int datasync); |
782 | int (*fasync) (int, struct file *, int); | 782 | int (*fasync) (int, struct file *, int); |
783 | int (*lock) (struct file *, int, struct file_lock *); | 783 | int (*lock) (struct file *, int, struct file_lock *); |