Lines Matching refs:part
357 int blk_alloc_devt(struct hd_struct *part, dev_t *devt);
364 void delete_partition(struct hd_struct *part);
371 int hd_ref_init(struct hd_struct *part);
374 static inline int hd_struct_try_get(struct hd_struct *part) in hd_struct_try_get() argument
376 if (part->partno) in hd_struct_try_get()
377 return percpu_ref_tryget_live(&part->ref); in hd_struct_try_get()
381 static inline void hd_struct_put(struct hd_struct *part) in hd_struct_put() argument
383 if (part->partno) in hd_struct_put()
384 percpu_ref_put(&part->ref); in hd_struct_put()
387 static inline void hd_free_part(struct hd_struct *part) in hd_free_part() argument
389 free_percpu(part->dkstats); in hd_free_part()
390 kfree(part->info); in hd_free_part()
391 percpu_ref_exit(&part->ref); in hd_free_part()
403 static inline sector_t part_nr_sects_read(struct hd_struct *part) in part_nr_sects_read() argument
409 seq = read_seqcount_begin(&part->nr_sects_seq); in part_nr_sects_read()
410 nr_sects = part->nr_sects; in part_nr_sects_read()
411 } while (read_seqcount_retry(&part->nr_sects_seq, seq)); in part_nr_sects_read()
417 nr_sects = part->nr_sects; in part_nr_sects_read()
421 return part->nr_sects; in part_nr_sects_read()
430 static inline void part_nr_sects_write(struct hd_struct *part, sector_t size) in part_nr_sects_write() argument
434 write_seqcount_begin(&part->nr_sects_seq); in part_nr_sects_write()
435 part->nr_sects = size; in part_nr_sects_write()
436 write_seqcount_end(&part->nr_sects_seq); in part_nr_sects_write()
440 part->nr_sects = size; in part_nr_sects_write()
443 part->nr_sects = size; in part_nr_sects_write()