Lines Matching refs:part
356 int blk_alloc_devt(struct hd_struct *part, dev_t *devt);
363 void delete_partition(struct hd_struct *part);
370 int hd_ref_init(struct hd_struct *part);
373 static inline int hd_struct_try_get(struct hd_struct *part)
375 if (part->partno)
376 return percpu_ref_tryget_live(&part->ref);
380 static inline void hd_struct_put(struct hd_struct *part)
382 if (part->partno)
383 percpu_ref_put(&part->ref);
386 static inline void hd_free_part(struct hd_struct *part)
388 free_percpu(part->dkstats);
389 kfree(part->info);
390 percpu_ref_exit(&part->ref);
394 * Any access of part->nr_sects which is not protected by partition
402 static inline sector_t part_nr_sects_read(struct hd_struct *part)
408 seq = read_seqcount_begin(&part->nr_sects_seq);
409 nr_sects = part->nr_sects;
410 } while (read_seqcount_retry(&part->nr_sects_seq, seq));
416 nr_sects = part->nr_sects;
420 return part->nr_sects;
429 static inline void part_nr_sects_write(struct hd_struct *part, sector_t size)
433 write_seqcount_begin(&part->nr_sects_seq);
434 part->nr_sects = size;
435 write_seqcount_end(&part->nr_sects_seq);
439 part->nr_sects = size;
442 part->nr_sects = size;