static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
/* SLAB cache for dquot structures */
static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
/* SLAB cache for dquot structures */
/* Add a dquot to the tail of the free list */
static inline void put_dquot_last(struct dquot *dquot)
{
/* Add a dquot to the tail of the free list */
static inline void put_dquot_last(struct dquot *dquot)
{
{
/* We add to the back of inuse list so we don't have to restart
* when traversing this list and we block */
{
/* We add to the back of inuse list so we don't have to restart
* when traversing this list and we block */
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file *filp = list_entry(p, struct file, f_u.fu_list);
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file *filp = list_entry(p, struct file, f_u.fu_list);
int flag = (warntype == BHARDWARN || warntype == BSOFTLONGWARN) ? DQ_BLKS_B :
((warntype == IHARDWARN || warntype == ISOFTLONGWARN) ? DQ_INODES_B : 0);
if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags)))
return;
int flag = (warntype == BHARDWARN || warntype == BSOFTLONGWARN) ? DQ_BLKS_B :
((warntype == IHARDWARN || warntype == ISOFTLONGWARN) ? DQ_INODES_B : 0);
if (!need_print_warning(dquot) || (flag && test_and_set_bit(flag, &dquot->dq_flags)))
return;
- tty_write_message(current->signal->tty, dquot->dq_sb->s_id);
+ mutex_lock(&tty_mutex);
+ tty = get_current_tty();
+ if (!tty)
+ goto out_lock;
+ tty_write_message(tty, dquot->dq_sb->s_id);
- tty_write_message(current->signal->tty, ": write failed, ");
- tty_write_message(current->signal->tty, quotatypes[dquot->dq_type]);
+ tty_write_message(tty, ": write failed, ");
+ tty_write_message(tty, quotatypes[dquot->dq_type]);