From 375e289ea85166c5241c570940e7e7e966c63a9f Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Wed, 18 Apr 2012 15:16:33 -0400 Subject: vfs: pull ext4's double-i_mutex-locking into common code We want to do this elsewhere as well. Also catch any attempts to use it for directories (where this ordering would conflict with ancestor-first directory ordering in lock_rename). Cc: Andreas Dilger Cc: Dave Chinner Acked-by: Jeff Layton Acked-by: "Theodore Ts'o" Signed-off-by: J. Bruce Fields Signed-off-by: Al Viro --- include/linux/fs.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/linux/fs.h b/include/linux/fs.h index 5e44b0893db8..4e1a0b41f966 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -637,6 +637,9 @@ enum inode_i_mutex_lock_class I_MUTEX_QUOTA }; +void lock_two_nondirectories(struct inode *, struct inode*); +void unlock_two_nondirectories(struct inode *, struct inode*); + /* * NOTE: in a 32bit arch with a preemptable kernel and * an UP compile the i_size_read/write must be atomic -- cgit v1.2.3