Lines Matching refs:warn
1198 static int need_print_warning(struct dquot_warn *warn) in need_print_warning() argument
1203 switch (warn->w_dq_id.type) { in need_print_warning()
1205 return uid_eq(current_fsuid(), warn->w_dq_id.uid); in need_print_warning()
1207 return in_group_p(warn->w_dq_id.gid); in need_print_warning()
1215 static void print_warning(struct dquot_warn *warn) in print_warning() argument
1219 int warntype = warn->w_type; in print_warning()
1224 warntype == QUOTA_NL_BSOFTBELOW || !need_print_warning(warn)) in print_warning()
1230 tty_write_message(tty, warn->w_sb->s_id); in print_warning()
1235 tty_write_message(tty, quotatypes[warn->w_dq_id.type]); in print_warning()
1261 static void prepare_warning(struct dquot_warn *warn, struct dquot *dquot, in prepare_warning() argument
1266 warn->w_type = warntype; in prepare_warning()
1267 warn->w_sb = dquot->dq_sb; in prepare_warning()
1268 warn->w_dq_id = dquot->dq_id; in prepare_warning()
1276 static void flush_warnings(struct dquot_warn *warn) in flush_warnings() argument
1281 if (warn[i].w_type == QUOTA_NL_NOWARN) in flush_warnings()
1284 print_warning(&warn[i]); in flush_warnings()
1286 quota_send_warning(warn[i].w_dq_id, in flush_warnings()
1287 warn[i].w_sb->s_dev, warn[i].w_type); in flush_warnings()
1301 struct dquot_warn *warn) in dquot_add_inodes() argument
1315 prepare_warning(warn, dquot, QUOTA_NL_IHARDWARN); in dquot_add_inodes()
1325 prepare_warning(warn, dquot, QUOTA_NL_ISOFTLONGWARN); in dquot_add_inodes()
1333 prepare_warning(warn, dquot, QUOTA_NL_ISOFTWARN); in dquot_add_inodes()
1347 struct dquot_warn *warn) in dquot_add_space() argument
1365 prepare_warning(warn, dquot, QUOTA_NL_BHARDWARN); in dquot_add_space()
1376 prepare_warning(warn, dquot, QUOTA_NL_BSOFTLONGWARN); in dquot_add_space()
1385 prepare_warning(warn, dquot, QUOTA_NL_BSOFTWARN); in dquot_add_space()
1693 struct dquot_warn warn[MAXQUOTAS]; in __dquot_alloc_space() local
1710 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_alloc_space()
1720 ret = dquot_add_space(dquot, 0, number, flags, &warn[cnt]); in __dquot_alloc_space()
1722 ret = dquot_add_space(dquot, number, 0, flags, &warn[cnt]); in __dquot_alloc_space()
1752 flush_warnings(warn); in __dquot_alloc_space()
1764 struct dquot_warn warn[MAXQUOTAS]; in dquot_alloc_inode() local
1771 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_alloc_inode()
1780 ret = dquot_add_inodes(dquot, 1, &warn[cnt]); in dquot_alloc_inode()
1800 flush_warnings(warn); in dquot_alloc_inode()
1895 struct dquot_warn warn[MAXQUOTAS]; in __dquot_free_space() local
1917 warn[cnt].w_type = QUOTA_NL_NOWARN; in __dquot_free_space()
1924 prepare_warning(&warn[cnt], dquot, wtype); in __dquot_free_space()
1942 flush_warnings(warn); in __dquot_free_space()
1952 struct dquot_warn warn[MAXQUOTAS]; in dquot_free_inode() local
1965 warn[cnt].w_type = QUOTA_NL_NOWARN; in dquot_free_inode()
1972 prepare_warning(&warn[cnt], dquot, wtype); in dquot_free_inode()
1979 flush_warnings(warn); in dquot_free_inode()