diff options
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r-- | drivers/md/dm-table.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c index a740a6950f59..7c8671b06fe3 100644 --- a/drivers/md/dm-table.c +++ b/drivers/md/dm-table.c | |||
@@ -43,7 +43,7 @@ struct dm_table { | |||
43 | * device. This should be a combination of FMODE_READ | 43 | * device. This should be a combination of FMODE_READ |
44 | * and FMODE_WRITE. | 44 | * and FMODE_WRITE. |
45 | */ | 45 | */ |
46 | int mode; | 46 | fmode_t mode; |
47 | 47 | ||
48 | /* a list of devices used by this table */ | 48 | /* a list of devices used by this table */ |
49 | struct list_head devices; | 49 | struct list_head devices; |
@@ -217,7 +217,7 @@ static int alloc_targets(struct dm_table *t, unsigned int num) | |||
217 | return 0; | 217 | return 0; |
218 | } | 218 | } |
219 | 219 | ||
220 | int dm_table_create(struct dm_table **result, int mode, | 220 | int dm_table_create(struct dm_table **result, fmode_t mode, |
221 | unsigned num_targets, struct mapped_device *md) | 221 | unsigned num_targets, struct mapped_device *md) |
222 | { | 222 | { |
223 | struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL); | 223 | struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL); |
@@ -395,7 +395,7 @@ static int check_device_area(struct dm_dev_internal *dd, sector_t start, | |||
395 | * careful to leave things as they were if we fail to reopen the | 395 | * careful to leave things as they were if we fail to reopen the |
396 | * device. | 396 | * device. |
397 | */ | 397 | */ |
398 | static int upgrade_mode(struct dm_dev_internal *dd, int new_mode, | 398 | static int upgrade_mode(struct dm_dev_internal *dd, fmode_t new_mode, |
399 | struct mapped_device *md) | 399 | struct mapped_device *md) |
400 | { | 400 | { |
401 | int r; | 401 | int r; |
@@ -421,7 +421,7 @@ static int upgrade_mode(struct dm_dev_internal *dd, int new_mode, | |||
421 | */ | 421 | */ |
422 | static int __table_get_device(struct dm_table *t, struct dm_target *ti, | 422 | static int __table_get_device(struct dm_table *t, struct dm_target *ti, |
423 | const char *path, sector_t start, sector_t len, | 423 | const char *path, sector_t start, sector_t len, |
424 | int mode, struct dm_dev **result) | 424 | fmode_t mode, struct dm_dev **result) |
425 | { | 425 | { |
426 | int r; | 426 | int r; |
427 | dev_t uninitialized_var(dev); | 427 | dev_t uninitialized_var(dev); |
@@ -537,7 +537,7 @@ void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev) | |||
537 | EXPORT_SYMBOL_GPL(dm_set_device_limits); | 537 | EXPORT_SYMBOL_GPL(dm_set_device_limits); |
538 | 538 | ||
539 | int dm_get_device(struct dm_target *ti, const char *path, sector_t start, | 539 | int dm_get_device(struct dm_target *ti, const char *path, sector_t start, |
540 | sector_t len, int mode, struct dm_dev **result) | 540 | sector_t len, fmode_t mode, struct dm_dev **result) |
541 | { | 541 | { |
542 | int r = __table_get_device(ti->table, ti, path, | 542 | int r = __table_get_device(ti->table, ti, path, |
543 | start, len, mode, result); | 543 | start, len, mode, result); |
@@ -887,7 +887,7 @@ struct list_head *dm_table_get_devices(struct dm_table *t) | |||
887 | return &t->devices; | 887 | return &t->devices; |
888 | } | 888 | } |
889 | 889 | ||
890 | int dm_table_get_mode(struct dm_table *t) | 890 | fmode_t dm_table_get_mode(struct dm_table *t) |
891 | { | 891 | { |
892 | return t->mode; | 892 | return t->mode; |
893 | } | 893 | } |