Al Viro
1e2e547a93
do d_instantiate/unlock_new_inode combinations safely
...
For anything NFS-exported we do _not_ want to unlock new inode
before it has grown an alias; original set of fixes got the
ordering right, but missed the nasty complication in case of
lockdep being enabled - unlock_new_inode() does
lockdep_annotate_inode_mutex_key(inode)
which can only be done before anyone gets a chance to touch
->i_mutex. Unfortunately, flipping the order and doing
unlock_new_inode() before d_instantiate() opens a window when
mkdir can race with open-by-fhandle on a guessed fhandle, leading
to multiple aliases for a directory inode and all the breakage
that follows from that.
Correct solution: a new primitive (d_instantiate_new())
combining these two in the right order - lockdep annotate, then
d_instantiate(), then the rest of unlock_new_inode(). All
combinations of d_instantiate() with unlock_new_inode() should
be converted to that.
Cc: [email protected] # 2.6.29 and later
Tested-by: Mike Marshall <[email protected] >
Reviewed-by: Andreas Dilger <[email protected] >
Signed-off-by: Al Viro <[email protected] >
2018-05-11 15:36:37 -04:00
..
2018-03-31 01:33:09 +08:00
2018-04-02 11:17:51 +02:00
2018-04-13 15:51:06 -07:00
2018-03-27 15:34:20 +02:00
2018-04-04 15:19:26 -07:00
2018-04-13 16:20:36 -07:00
2018-04-06 17:35:43 -07:00
2018-04-04 22:11:36 +02:00
2018-03-30 11:41:18 -04:00
2018-04-13 16:20:36 -07:00
2018-03-29 14:29:55 -04:00
2018-04-07 12:08:19 -07:00
2018-04-11 10:28:37 -07:00
2018-04-10 12:09:27 -07:00
2018-04-12 12:55:50 -07:00
2018-04-05 10:42:07 -07:00
2018-04-13 15:15:15 -07:00
2018-04-11 10:28:37 -07:00
2018-04-02 20:52:27 -07:00
2018-03-27 21:25:36 -06:00
2018-04-10 08:38:46 -06:00
2018-03-31 02:15:18 +02:00
2018-03-31 02:16:26 +02:00
2018-03-31 02:14:44 +02:00
2018-04-03 18:00:13 -07:00
2018-04-15 16:12:35 -07:00
2018-04-11 10:28:35 -07:00
2018-04-11 10:28:35 -07:00
2018-04-11 10:28:38 -07:00
2018-04-10 08:40:45 +02:00
2018-04-06 09:29:34 +02:00
2018-04-03 05:41:19 -07:00
2018-05-11 15:36:37 -04:00
2018-04-06 11:50:19 -07:00
2018-04-04 19:41:45 -07:00
2018-04-03 15:04:23 -04:00
2018-04-05 10:23:24 -07:00
2018-04-05 14:21:13 -07:00
2018-04-05 21:36:26 -07:00
2018-03-31 02:15:18 +02:00
2018-04-12 12:28:32 -07:00
2018-04-06 14:05:14 +01:00
2018-04-06 14:05:14 +01:00
2018-04-02 20:15:02 +02:00
2018-04-05 13:28:46 +02:00
2018-04-11 10:28:31 -07:00
2018-04-11 13:22:46 +02:00
2018-04-09 11:42:31 -07:00
2018-04-05 14:27:02 -07:00
2018-04-11 10:28:39 -07:00
2018-04-01 19:49:34 -04:00
2018-04-06 09:28:50 +02:00
2018-04-05 21:36:24 -07:00
2018-03-31 12:22:38 +09:00
2018-04-11 10:28:35 -07:00
2018-04-13 17:10:28 -07:00
2018-04-11 10:28:38 -07:00
2018-04-07 07:53:23 -07:00
2018-03-29 17:29:09 -06:00
2018-04-05 21:36:27 -07:00
2018-04-12 09:41:19 -07:00
2018-04-07 16:53:59 -07:00
2018-04-07 12:08:19 -07:00
2018-04-11 10:28:31 -07:00
2018-04-11 10:28:32 -07:00
2018-04-05 21:36:25 -07:00
2018-04-11 10:28:32 -07:00
2018-04-05 21:36:27 -07:00
2018-04-11 10:28:39 -07:00
2018-04-05 21:36:27 -07:00
2018-04-11 10:28:32 -07:00
2018-04-13 15:37:59 +02:00
2018-03-26 13:14:43 -04:00
2018-03-26 13:14:43 -04:00
2018-03-26 13:14:43 -04:00
2018-03-30 12:56:22 -04:00
2018-03-31 23:37:32 -04:00
2018-03-30 10:11:06 -04:00
2018-04-10 16:06:22 -04:00
2018-04-10 16:06:22 -04:00
2018-04-05 21:36:25 -07:00
2018-03-30 10:40:18 -04:00
2018-04-05 21:36:25 -07:00
2018-04-05 21:36:25 -07:00
2018-04-11 10:28:32 -07:00
2018-04-11 10:28:39 -07:00
2018-04-06 18:31:06 -07:00
2018-04-03 12:38:05 +01:00
2018-04-03 12:23:38 +01:00
2018-04-06 18:31:06 -07:00
2018-03-29 16:07:22 +02:00
2018-03-30 10:11:06 -04:00
2018-04-02 20:15:46 +02:00
2018-04-11 10:28:39 -07:00
2018-03-27 10:39:47 +02:00
2018-03-31 23:25:39 -04:00
2018-03-29 13:47:53 -04:00
2018-04-05 14:27:02 -07:00
2018-04-05 10:56:16 +02:00
2018-04-07 16:53:59 -07:00
2018-04-11 10:28:36 -07:00
2018-04-13 17:10:28 -07:00
2018-03-28 13:29:57 -05:00
2018-04-16 02:06:47 -04:00
2018-03-31 23:25:40 -04:00
2018-04-05 21:36:24 -07:00
2018-04-05 21:36:27 -07:00
2018-04-05 21:36:24 -07:00
2018-04-03 14:04:18 -07:00
2018-03-28 18:47:17 +03:00
2018-04-05 21:36:25 -07:00
2018-04-09 16:47:27 +02:00
2018-04-02 21:49:01 +08:00
2018-04-09 11:54:56 +02:00
2018-04-12 10:21:19 -07:00
2018-04-10 11:27:30 -07:00
2018-03-28 22:55:19 +02:00
2018-04-11 10:28:35 -07:00
2018-04-11 10:28:30 -07:00
2018-04-03 18:00:13 -07:00
2018-04-11 10:28:39 -07:00
2018-04-05 21:36:26 -07:00