aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-09-02 15:28:45 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:47:06 -0400
commitaeb5d727062a0238a2f96c9c380fbd2be4640c6f (patch)
tree51dae8a071fcf42e4431a66d37c5b843c8e99cf6 /drivers/md
parent2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff)
[PATCH] introduce fmode_t, do annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-ioctl.c4
-rw-r--r--drivers/md/dm-table.c12
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index dca401dc70a0..777c948180f9 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -988,9 +988,9 @@ static int dev_wait(struct dm_ioctl *param, size_t param_size)
988 return r; 988 return r;
989} 989}
990 990
991static inline int get_mode(struct dm_ioctl *param) 991static inline fmode_t get_mode(struct dm_ioctl *param)
992{ 992{
993 int mode = FMODE_READ | FMODE_WRITE; 993 fmode_t mode = FMODE_READ | FMODE_WRITE;
994 994
995 if (param->flags & DM_READONLY_FLAG) 995 if (param->flags & DM_READONLY_FLAG)
996 mode = FMODE_READ; 996 mode = FMODE_READ;
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
220int dm_table_create(struct dm_table **result, int mode, 220int 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 */
398static int upgrade_mode(struct dm_dev_internal *dd, int new_mode, 398static 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 */
422static int __table_get_device(struct dm_table *t, struct dm_target *ti, 422static 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)
537EXPORT_SYMBOL_GPL(dm_set_device_limits); 537EXPORT_SYMBOL_GPL(dm_set_device_limits);
538 538
539int dm_get_device(struct dm_target *ti, const char *path, sector_t start, 539int 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
890int dm_table_get_mode(struct dm_table *t) 890fmode_t dm_table_get_mode(struct dm_table *t)
891{ 891{
892 return t->mode; 892 return t->mode;
893} 893}