diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-08-22 18:50:48 -0400 |
---|---|---|
committer | Jeff Layton <jlayton@primarydata.com> | 2014-10-07 14:06:13 -0400 |
commit | f82b4b6780afabce9d9a91c84fae17ec3d63b9d7 (patch) | |
tree | 525f28ccf756579147d7d498734a057b859e2215 /Documentation/filesystems | |
parent | 1c7dd2ff430fa14b45c9def54468e3a25ab8342b (diff) |
locks: move i_lock acquisition into generic_*_lease handlers
Now that we have a saner internal API for managing leases, we no longer
need to mandate that the inode->i_lock be held over most of the lease
code. Push it down into generic_add_lease and generic_delete_lease.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/Locking | 6 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 3d92049ae71d..4af288e38f13 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -472,8 +472,6 @@ locking rules: | |||
472 | All may block except for ->setlease. | 472 | All may block except for ->setlease. |
473 | No VFS locks held on entry except for ->setlease. | 473 | No VFS locks held on entry except for ->setlease. |
474 | 474 | ||
475 | ->setlease has the file_list_lock held and must not sleep. | ||
476 | |||
477 | ->llseek() locking has moved from llseek to the individual llseek | 475 | ->llseek() locking has moved from llseek to the individual llseek |
478 | implementations. If your fs is not using generic_file_llseek, you | 476 | implementations. If your fs is not using generic_file_llseek, you |
479 | need to acquire and release the appropriate locks in your ->llseek(). | 477 | need to acquire and release the appropriate locks in your ->llseek(). |
@@ -496,6 +494,10 @@ components. And there are other reasons why the current interface is a mess... | |||
496 | ->read on directories probably must go away - we should just enforce -EISDIR | 494 | ->read on directories probably must go away - we should just enforce -EISDIR |
497 | in sys_read() and friends. | 495 | in sys_read() and friends. |
498 | 496 | ||
497 | ->setlease operations should call generic_setlease() before or after setting | ||
498 | the lease within the individual filesystem to record the result of the | ||
499 | operation | ||
500 | |||
499 | --------------------------- dquot_operations ------------------------------- | 501 | --------------------------- dquot_operations ------------------------------- |
500 | prototypes: | 502 | prototypes: |
501 | int (*write_dquot) (struct dquot *); | 503 | int (*write_dquot) (struct dquot *); |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 28ebd49f169f..8be1ea3bdd5a 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -895,8 +895,9 @@ otherwise noted. | |||
895 | splice_read: called by the VFS to splice data from file to a pipe. This | 895 | splice_read: called by the VFS to splice data from file to a pipe. This |
896 | method is used by the splice(2) system call | 896 | method is used by the splice(2) system call |
897 | 897 | ||
898 | setlease: called by the VFS to set or release a file lock lease. | 898 | setlease: called by the VFS to set or release a file lock lease. setlease |
899 | setlease has the file_lock_lock held and must not sleep. | 899 | implementations should call generic_setlease to record or remove |
900 | the lease in the inode after setting it. | ||
900 | 901 | ||
901 | fallocate: called by the VFS to preallocate blocks or punch a hole. | 902 | fallocate: called by the VFS to preallocate blocks or punch a hole. |
902 | 903 | ||