Amir Goldstein
fab8eef86c
xfs: sanity check inode mode when creating new dentry
...
The helper xfs_dentry_to_name() is used by 2 different
classes of callers: Callers that pass zero mode and don't care
about the returned name.type field and Callers that pass
non zero mode and do care about the name.type field.
Change xfs_dentry_to_name() to not take the mode argument and
change the call sites of the first class to not pass the mode
argument.
Create a new helper xfs_dentry_mode_to_name() which does pass
the mode argument and returns -EFSCORRUPTED if mode is invalid.
Callers that translate non zero mode to on-disk file type now
check the return value and will export the error to user instead
of staging an invalid file type to be written to directory entry.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2017-01-17 11:42:22 -08:00
..
2016-12-24 11:46:01 -08:00
2016-10-10 20:16:43 -07:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-12-22 11:25:24 +00:00
2016-12-24 11:46:01 -08:00
2017-01-13 17:40:22 -08:00
2016-10-10 20:16:43 -07:00
2017-01-12 19:31:01 +01:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-31 00:47:05 -05:00
2016-10-10 20:16:43 -07:00
2016-10-10 20:16:43 -07:00
2016-12-25 17:21:23 +01:00
2016-12-09 16:45:04 +01:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-10 14:25:19 -05:00
2016-10-06 09:07:44 -04:00
2016-12-26 20:29:24 -08:00
2016-12-26 20:29:25 -08:00
2017-01-12 07:58:32 -07:00
2016-10-10 20:16:43 -07:00
2016-12-17 19:16:12 -08:00
2016-12-25 17:21:22 +01:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-13 10:19:16 -08:00
2016-12-24 11:46:01 -08:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-11-18 10:59:15 -05:00
2016-12-09 16:45:04 +01:00
2016-12-24 11:46:01 -08:00
2016-12-25 17:21:23 +01:00
2016-11-18 10:59:15 -05:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2017-01-05 23:06:06 -08:00
2016-12-24 11:46:01 -08:00
2017-01-10 18:31:54 -08:00
2016-10-10 20:16:43 -07:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-12-17 19:16:12 -08:00
2017-01-10 13:34:57 +13:00
2016-12-13 09:16:11 -08:00
2016-12-19 08:23:53 -08:00
2016-12-24 11:46:01 -08:00
2016-12-17 19:16:12 -08:00
2016-12-17 19:16:12 -08:00
2016-10-14 12:18:50 -07:00
2016-12-09 16:45:04 +01:00
2016-09-27 21:06:21 -04:00
2016-12-17 19:16:12 -08:00
2016-11-01 09:43:26 -06:00
2016-12-24 11:46:01 -08:00
2017-01-17 11:42:22 -08:00
2017-01-14 19:31:40 -05:00
2016-12-24 11:46:01 -08:00
2016-10-10 20:16:43 -07:00
2016-12-09 11:57:43 +01:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-01-14 19:32:40 -05:00
2016-09-27 21:06:22 -04:00
2017-01-04 09:03:37 -08:00
2017-01-02 09:35:14 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2017-01-14 19:32:40 -05:00
2017-01-10 18:31:54 -08:00
2017-01-10 13:34:43 +13:00
2016-12-24 11:46:01 -08:00
2017-01-10 13:29:54 -07:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-05 19:01:16 -05:00
2016-09-27 18:47:38 -04:00
2016-12-24 11:46:01 -08:00
2016-12-12 18:55:08 -08:00
2016-10-10 20:16:43 -07:00
2016-12-17 18:44:00 -08:00
2016-12-16 11:02:54 +01:00
2016-12-14 21:35:31 -08:00
2016-12-16 10:24:44 -08:00
2016-10-24 08:12:35 -02:00
2017-01-10 13:34:55 +13:00
2016-12-24 11:46:01 -08:00
2016-12-14 23:48:11 -05:00
2016-12-03 15:55:01 -05:00
2016-12-03 20:51:35 -05:00
2016-11-04 14:34:47 -06:00
2016-12-24 11:46:01 -08:00
2017-01-10 13:34:43 +13:00
2016-10-31 10:56:36 -04:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-16 16:30:49 -05:00
2016-09-30 12:46:48 -05:00
2017-01-10 01:29:48 -05:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00
2016-12-21 10:59:34 -08:00
2016-12-24 11:46:01 -08:00
2016-12-05 19:03:49 -05:00
2016-11-30 08:38:07 +01:00
2016-12-25 17:21:22 +01:00
2016-12-14 16:04:09 -08:00
2016-12-24 11:46:01 -08:00
2016-12-24 11:46:01 -08:00