• Home
  • Raw
  • Download

Lines Matching refs:sb

21 static int check_quotactl_permission(struct super_block *sb, int type, int cmd,  in check_quotactl_permission()  argument
44 return security_quotactl(cmd, type, id, sb); in check_quotactl_permission()
47 static void quota_sync_one(struct super_block *sb, void *arg) in quota_sync_one() argument
49 if (sb->s_qcop && sb->s_qcop->quota_sync) in quota_sync_one()
50 sb->s_qcop->quota_sync(sb, *(int *)arg); in quota_sync_one()
65 static int quota_quotaon(struct super_block *sb, int type, int cmd, qid_t id, in quota_quotaon() argument
68 if (!sb->s_qcop->quota_on && !sb->s_qcop->quota_on_meta) in quota_quotaon()
70 if (sb->s_qcop->quota_on_meta) in quota_quotaon()
71 return sb->s_qcop->quota_on_meta(sb, type, id); in quota_quotaon()
74 return sb->s_qcop->quota_on(sb, type, id, path); in quota_quotaon()
77 static int quota_getfmt(struct super_block *sb, int type, void __user *addr) in quota_getfmt() argument
81 down_read(&sb_dqopt(sb)->dqptr_sem); in quota_getfmt()
82 if (!sb_has_quota_active(sb, type)) { in quota_getfmt()
83 up_read(&sb_dqopt(sb)->dqptr_sem); in quota_getfmt()
86 fmt = sb_dqopt(sb)->info[type].dqi_format->qf_fmt_id; in quota_getfmt()
87 up_read(&sb_dqopt(sb)->dqptr_sem); in quota_getfmt()
93 static int quota_getinfo(struct super_block *sb, int type, void __user *addr) in quota_getinfo() argument
98 if (!sb->s_qcop->get_info) in quota_getinfo()
100 ret = sb->s_qcop->get_info(sb, type, &info); in quota_getinfo()
106 static int quota_setinfo(struct super_block *sb, int type, void __user *addr) in quota_setinfo() argument
112 if (!sb->s_qcop->set_info) in quota_setinfo()
114 return sb->s_qcop->set_info(sb, type, &info); in quota_setinfo()
130 static int quota_getquota(struct super_block *sb, int type, qid_t id, in quota_getquota() argument
138 if (!sb->s_qcop->get_dqblk) in quota_getquota()
143 ret = sb->s_qcop->get_dqblk(sb, qid, &fdq); in quota_getquota()
178 static int quota_setquota(struct super_block *sb, int type, qid_t id, in quota_setquota() argument
187 if (!sb->s_qcop->set_dqblk) in quota_setquota()
193 return sb->s_qcop->set_dqblk(sb, qid, &fdq); in quota_setquota()
196 static int quota_setxstate(struct super_block *sb, int cmd, void __user *addr) in quota_setxstate() argument
202 if (!sb->s_qcop->set_xstate) in quota_setxstate()
204 return sb->s_qcop->set_xstate(sb, flags, cmd); in quota_setxstate()
207 static int quota_getxstate(struct super_block *sb, void __user *addr) in quota_getxstate() argument
212 if (!sb->s_qcop->get_xstate) in quota_getxstate()
214 ret = sb->s_qcop->get_xstate(sb, &fqs); in quota_getxstate()
220 static int quota_setxquota(struct super_block *sb, int type, qid_t id, in quota_setxquota() argument
228 if (!sb->s_qcop->set_dqblk) in quota_setxquota()
233 return sb->s_qcop->set_dqblk(sb, qid, &fdq); in quota_setxquota()
236 static int quota_getxquota(struct super_block *sb, int type, qid_t id, in quota_getxquota() argument
243 if (!sb->s_qcop->get_dqblk) in quota_getxquota()
248 ret = sb->s_qcop->get_dqblk(sb, qid, &fdq); in quota_getxquota()
255 static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id, in do_quotactl() argument
262 if (!sb->s_qcop) in do_quotactl()
265 ret = check_quotactl_permission(sb, type, cmd, id); in do_quotactl()
271 return quota_quotaon(sb, type, cmd, id, path); in do_quotactl()
273 if (!sb->s_qcop->quota_off) in do_quotactl()
275 return sb->s_qcop->quota_off(sb, type); in do_quotactl()
277 return quota_getfmt(sb, type, addr); in do_quotactl()
279 return quota_getinfo(sb, type, addr); in do_quotactl()
281 return quota_setinfo(sb, type, addr); in do_quotactl()
283 return quota_getquota(sb, type, id, addr); in do_quotactl()
285 return quota_setquota(sb, type, id, addr); in do_quotactl()
287 if (!sb->s_qcop->quota_sync) in do_quotactl()
289 return sb->s_qcop->quota_sync(sb, type); in do_quotactl()
293 return quota_setxstate(sb, cmd, addr); in do_quotactl()
295 return quota_getxstate(sb, addr); in do_quotactl()
297 return quota_setxquota(sb, type, id, addr); in do_quotactl()
299 return quota_getxquota(sb, type, id, addr); in do_quotactl()
301 if (sb->s_flags & MS_RDONLY) in do_quotactl()
337 struct super_block *sb; in quotactl_block() local
347 sb = get_super_thawed(bdev); in quotactl_block()
349 sb = get_super(bdev); in quotactl_block()
351 if (!sb) in quotactl_block()
354 return sb; in quotactl_block()
370 struct super_block *sb = NULL; in SYSCALL_DEFINE4() local
401 sb = quotactl_block(special, cmds); in SYSCALL_DEFINE4()
402 if (IS_ERR(sb)) { in SYSCALL_DEFINE4()
403 ret = PTR_ERR(sb); in SYSCALL_DEFINE4()
407 ret = do_quotactl(sb, type, cmds, id, addr, pathp); in SYSCALL_DEFINE4()
409 drop_super(sb); in SYSCALL_DEFINE4()