Al Viro
d08d1bb535
new primitive: discard_new_inode()
...
commit c2b6d621c4 upstream.
We don't want open-by-handle picking half-set-up in-core
struct inode from e.g. mkdir() having failed halfway through.
In other words, we don't want such inodes returned by iget_locked()
on their way to extinction. However, we can't just have them
unhashed - otherwise open-by-handle immediately *after* that would've
ended up creating a new in-core inode over the on-disk one that
is in process of being freed right under us.
Solution: new flag (I_CREATING) set by insert_inode_locked() and
removed by unlock_new_inode() and a new primitive (discard_new_inode())
to be used by such halfway-through-setup failure exits instead of
unlock_new_inode() / iput() combinations. That primitive unlocks new
inode, but leaves I_CREATING in place.
iget_locked() treats finding an I_CREATING inode as failure
(-ESTALE, once we sort out the error propagation).
insert_inode_locked() treats the same as instant -EBUSY.
ilookup() treats those as icache miss.
[Fix by Dan Carpenter <dan.carpenter@oracle.com > folded in]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk >
Cc: Miklos Szeredi <mszeredi@redhat.com >
Cc: Amir Goldstein <amir73il@gmail.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-10-10 08:56:04 +02:00
..
2018-06-04 20:46:00 +02:00
2018-07-16 14:02:45 -07:00
2018-06-24 14:23:21 +01:00
2018-06-11 10:21:06 -07:00
2018-09-09 10:32:38 +02:00
2018-06-11 07:23:19 -07:00
2018-09-26 08:39:21 +02:00
2018-06-06 18:39:49 -07:00
2018-09-19 22:41:32 +02:00
2018-06-11 14:24:32 -07:00
2018-10-03 16:59:25 -07:00
2018-06-05 10:48:09 -04:00
2018-10-03 16:59:19 -07:00
2018-06-03 17:37:15 -07:00
2018-07-22 11:51:30 -07:00
2018-06-11 18:19:45 -07:00
2018-09-09 10:32:38 +02:00
2018-06-06 09:08:38 -07:00
2018-06-25 21:30:12 +08:00
2018-06-02 19:29:27 -05:00
2018-10-03 16:59:27 -07:00
2018-06-15 18:10:01 -03:00
2018-06-15 18:10:01 -03:00
2018-06-17 08:27:01 +09:00
2018-06-22 12:08:07 -06:00
2018-06-08 13:36:19 -07:00
2018-10-03 16:59:13 -07:00
2018-06-02 20:35:00 -06:00
2018-10-10 08:55:54 +02:00
2018-07-24 14:41:50 -06:00
2018-06-26 12:18:27 -06:00
2018-06-26 11:28:38 +02:00
2018-07-09 10:33:49 +02:00
2018-06-26 11:28:38 +02:00
2018-07-21 16:21:25 -07:00
2018-06-05 09:43:09 -04:00
2018-06-01 18:37:33 -07:00
2018-06-05 18:06:24 +01:00
2018-06-15 18:10:01 -03:00
2018-06-09 12:06:24 -07:00
2018-06-25 23:21:13 +09:00
2018-06-25 23:21:12 +09:00
2018-05-31 16:41:41 -07:00
2018-07-03 10:56:27 +02:00
2018-05-31 16:41:41 -07:00
2018-06-04 17:28:20 -04:00
2018-08-15 17:37:33 +02:00
2018-09-26 08:39:36 +02:00
2018-06-28 11:16:44 -07:00
2018-07-26 19:38:03 -07:00
2018-06-06 17:27:14 -07:00
2018-06-14 08:50:37 +02:00
2018-06-01 07:38:16 -06:00
2018-07-26 19:38:03 -07:00
2018-07-07 15:25:35 -07:00
2018-10-10 08:56:04 +02:00
2018-06-11 10:16:13 -07:00
2018-06-11 10:16:13 -07:00
2018-07-03 18:33:19 -04:00
2018-06-07 17:34:38 -07:00
2018-09-19 22:41:19 +02:00
2018-06-07 17:34:37 -07:00
2018-09-09 10:32:34 +02:00
2018-06-04 10:58:12 -07:00
2018-07-07 20:04:35 +09:00
2018-06-03 11:00:52 -04:00
2018-07-16 11:20:06 -07:00
2018-09-09 10:32:39 +02:00
2018-06-01 18:37:33 -07:00
2018-06-04 14:20:39 -04:00
2018-06-22 14:22:00 +02:00
2018-06-22 14:22:02 +02:00
2018-06-15 07:55:24 +09:00
2018-06-21 17:39:18 +02:00
2018-06-07 17:34:36 -07:00
2018-07-03 09:17:30 +02:00
2018-06-01 19:18:26 +02:00
2018-09-05 09:29:40 +02:00
2018-06-01 07:43:53 -06:00
2018-06-13 00:03:17 +09:00
2018-07-04 11:34:09 +09:00
2018-06-05 08:50:16 -04:00
2018-06-15 07:55:25 +09:00
2018-06-07 17:34:35 -07:00
2018-06-07 17:34:36 -07:00
2018-06-21 16:14:45 +02:00
2018-06-08 17:21:52 -07:00
2018-09-19 22:41:37 +02:00
2018-09-19 22:41:37 +02:00
2018-08-01 13:43:38 -07:00
2018-06-18 13:43:09 +09:00
2018-06-07 17:34:39 -07:00
2018-06-05 12:26:41 -04:00
2018-06-15 15:27:09 +01:00
2018-06-28 10:40:47 -07:00
2018-07-02 20:34:04 +09:00
2018-06-12 19:12:43 +02:00
2018-05-31 15:03:11 -04:00
2018-06-19 09:25:27 -04:00
2018-06-01 14:37:35 +02:00
2018-09-26 08:39:34 +02:00
2018-09-09 10:32:32 +02:00
2018-06-07 17:34:36 -07:00
2018-06-07 17:34:37 -07:00
2018-06-04 12:08:06 -05:00
2018-09-15 09:46:41 +02:00
2018-07-31 11:27:54 -05:00
2018-07-25 11:46:21 +02:00
2018-06-07 17:34:35 -07:00
2018-06-25 09:41:37 +02:00
2018-06-12 10:24:13 +02:00
2018-06-28 10:40:47 -07:00
2018-10-03 16:59:10 -07:00
2018-10-03 16:59:05 -07:00
2018-09-05 09:29:42 +02:00
2018-06-05 16:57:31 -07:00
2018-06-15 18:10:01 -03:00
2018-05-31 14:59:19 -04:00
2018-06-10 06:14:01 +02:00
2018-06-12 23:33:25 +02:00
2018-07-25 10:29:41 -04:00
2018-06-05 10:33:35 -07:00
2018-06-03 17:37:11 -07:00
2018-07-25 11:22:19 +02:00
2018-06-29 08:48:06 -06:00
2018-07-03 09:17:30 +02:00
2018-06-07 17:34:35 -07:00
2018-07-12 15:15:16 -07:00
2018-06-07 17:34:34 -07:00
2018-06-15 07:55:23 +09:00
2018-06-28 11:16:44 -07:00
2018-06-12 23:33:24 +02:00
2018-06-14 12:21:18 +09:00
2018-06-05 16:57:31 -07:00
2018-06-04 17:45:38 -07:00
2018-08-15 17:37:25 +02:00
2018-07-22 12:04:51 -07:00
2018-09-05 09:29:54 +02:00
2018-09-05 09:29:53 +02:00
2018-06-06 18:39:49 -07:00
2018-06-15 18:10:01 -03:00
2018-06-05 16:14:12 -07:00
2018-06-07 17:34:38 -07:00
2018-07-07 16:57:35 +02:00
2018-10-03 16:59:19 -07:00
2018-06-07 17:34:38 -07:00
2018-09-09 10:32:30 +02:00
2018-06-07 16:15:38 -04:00
2018-06-07 20:54:23 +03:00
2018-09-19 22:41:37 +02:00
2018-09-19 22:41:37 +02:00
2018-06-05 12:16:51 -07:00