aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/Locking
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/Locking')
-rw-r--r--Documentation/filesystems/Locking21
1 files changed, 15 insertions, 6 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index e0cce2a5f820..e540a24e5d06 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -114,7 +114,6 @@ prototypes:
114 int (*drop_inode) (struct inode *); 114 int (*drop_inode) (struct inode *);
115 void (*evict_inode) (struct inode *); 115 void (*evict_inode) (struct inode *);
116 void (*put_super) (struct super_block *); 116 void (*put_super) (struct super_block *);
117 void (*write_super) (struct super_block *);
118 int (*sync_fs)(struct super_block *sb, int wait); 117 int (*sync_fs)(struct super_block *sb, int wait);
119 int (*freeze_fs) (struct super_block *); 118 int (*freeze_fs) (struct super_block *);
120 int (*unfreeze_fs) (struct super_block *); 119 int (*unfreeze_fs) (struct super_block *);
@@ -136,10 +135,9 @@ write_inode:
136drop_inode: !!!inode->i_lock!!! 135drop_inode: !!!inode->i_lock!!!
137evict_inode: 136evict_inode:
138put_super: write 137put_super: write
139write_super: read
140sync_fs: read 138sync_fs: read
141freeze_fs: read 139freeze_fs: write
142unfreeze_fs: read 140unfreeze_fs: write
143statfs: maybe(read) (see below) 141statfs: maybe(read) (see below)
144remount_fs: write 142remount_fs: write
145umount_begin: no 143umount_begin: no
@@ -206,6 +204,8 @@ prototypes:
206 int (*launder_page)(struct page *); 204 int (*launder_page)(struct page *);
207 int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long); 205 int (*is_partially_uptodate)(struct page *, read_descriptor_t *, unsigned long);
208 int (*error_remove_page)(struct address_space *, struct page *); 206 int (*error_remove_page)(struct address_space *, struct page *);
207 int (*swap_activate)(struct file *);
208 int (*swap_deactivate)(struct file *);
209 209
210locking rules: 210locking rules:
211 All except set_page_dirty and freepage may block 211 All except set_page_dirty and freepage may block
@@ -229,6 +229,8 @@ migratepage: yes (both)
229launder_page: yes 229launder_page: yes
230is_partially_uptodate: yes 230is_partially_uptodate: yes
231error_remove_page: yes 231error_remove_page: yes
232swap_activate: no
233swap_deactivate: no
232 234
233 ->write_begin(), ->write_end(), ->sync_page() and ->readpage() 235 ->write_begin(), ->write_end(), ->sync_page() and ->readpage()
234may be called from the request handler (/dev/loop). 236may be called from the request handler (/dev/loop).
@@ -330,6 +332,15 @@ cleaned, or an error value if not. Note that in order to prevent the page
330getting mapped back in and redirtied, it needs to be kept locked 332getting mapped back in and redirtied, it needs to be kept locked
331across the entire operation. 333across the entire operation.
332 334
335 ->swap_activate will be called with a non-zero argument on
336files backing (non block device backed) swapfiles. A return value
337of zero indicates success, in which case this file can be used for
338backing swapspace. The swapspace operations will be proxied to the
339address space operations.
340
341 ->swap_deactivate() will be called in the sys_swapoff()
342path after ->swap_activate() returned success.
343
333----------------------- file_lock_operations ------------------------------ 344----------------------- file_lock_operations ------------------------------
334prototypes: 345prototypes:
335 void (*fl_copy_lock)(struct file_lock *, struct file_lock *); 346 void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
@@ -346,7 +357,6 @@ prototypes:
346 int (*lm_compare_owner)(struct file_lock *, struct file_lock *); 357 int (*lm_compare_owner)(struct file_lock *, struct file_lock *);
347 void (*lm_notify)(struct file_lock *); /* unblock callback */ 358 void (*lm_notify)(struct file_lock *); /* unblock callback */
348 int (*lm_grant)(struct file_lock *, struct file_lock *, int); 359 int (*lm_grant)(struct file_lock *, struct file_lock *, int);
349 void (*lm_release_private)(struct file_lock *);
350 void (*lm_break)(struct file_lock *); /* break_lease callback */ 360 void (*lm_break)(struct file_lock *); /* break_lease callback */
351 int (*lm_change)(struct file_lock **, int); 361 int (*lm_change)(struct file_lock **, int);
352 362
@@ -355,7 +365,6 @@ locking rules:
355lm_compare_owner: yes no 365lm_compare_owner: yes no
356lm_notify: yes no 366lm_notify: yes no
357lm_grant: no no 367lm_grant: no no
358lm_release_private: maybe no
359lm_break: yes no 368lm_break: yes no
360lm_change yes no 369lm_change yes no
361 370