Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 1ae10f4a authored by derfelot's avatar derfelot Committed by GitHub
Browse files

Merge pull request #44 from Flamefire/android-quota

Cherry picks from Google Android kernel
parents c89e0e6b 7ac988c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -505,6 +505,7 @@ static struct xt_target idletimer_tg __read_mostly = {
	.family		= NFPROTO_UNSPEC,
	.target		= idletimer_tg_target,
	.targetsize     = sizeof(struct idletimer_tg_info),
	.usersize	= offsetof(struct idletimer_tg_info, timer),
	.checkentry	= idletimer_tg_checkentry,
	.destroy        = idletimer_tg_destroy,
	.me		= THIS_MODULE,
+1 −0
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ static struct xt_target led_tg_reg __read_mostly = {
	.family		= NFPROTO_UNSPEC,
	.target		= led_tg,
	.targetsize	= sizeof(struct xt_led_info),
	.usersize	= offsetof(struct xt_led_info, internal_data),
	.checkentry	= led_tg_check,
	.destroy	= led_tg_destroy,
	.me		= THIS_MODULE,
+1 −2
Original line number Diff line number Diff line
@@ -192,9 +192,8 @@ static struct xt_match limit_mt_reg __read_mostly = {
	.compatsize       = sizeof(struct compat_xt_rateinfo),
	.compat_from_user = limit_mt_compat_from_user,
	.compat_to_user   = limit_mt_compat_to_user,
#else
	.usersize         = offsetof(struct xt_rateinfo, prev),
#endif
	.usersize         = offsetof(struct xt_rateinfo, prev),
	.me               = THIS_MODULE,
};

+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ static struct xt_match nfacct_mt_reg __read_mostly = {
	.match      = nfacct_mt,
	.destroy    = nfacct_mt_destroy,
	.matchsize  = sizeof(struct xt_nfacct_match_info),
	.usersize   = offsetof(struct xt_nfacct_match_info, nfacct),
	.me         = THIS_MODULE,
};

+4 −0
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ static ssize_t quota_proc_write(struct file *file, const char __user *input,
	if (copy_from_user(buf, input, size) != 0)
		return -EFAULT;
	buf[sizeof(buf)-1] = '\0';
	if (size < sizeof(buf))
		buf[size] = '\0';

	spin_lock_bh(&e->lock);
	e->quota = simple_strtoull(buf, NULL, 0);
@@ -326,6 +328,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
		.match      = quota_mt2,
		.destroy    = quota_mt2_destroy,
		.matchsize  = sizeof(struct xt_quota_mtinfo2),
		.usersize   = offsetof(struct xt_quota_mtinfo2, master),
		.me         = THIS_MODULE,
	},
	{
@@ -336,6 +339,7 @@ static struct xt_match quota_mt2_reg[] __read_mostly = {
		.match      = quota_mt2,
		.destroy    = quota_mt2_destroy,
		.matchsize  = sizeof(struct xt_quota_mtinfo2),
		.usersize   = offsetof(struct xt_quota_mtinfo2, master),
		.me         = THIS_MODULE,
	},
};
Loading