> int __sb_start_write(struct super_block *sb, int level, bool wait) > { > - int ret = 1; > + if (!wait) > + return percpu_down_read_trylock(sb->s_writers.rw_sem + level-1); > > + percpu_down_read(sb->s_writers.rw_sem + level-1); > + return 1; > } > EXPORT_SYMBOL(__sb_start_write); Please split the function into __sb_start_write and __sb_start_write_trylock while you're at it..