Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs/quota: use nla_put_u64_64bit()

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: Jan Kara <jack@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Nicolas Dichtel and committed by
David S. Miller
3c6f3714 08f4cbb8

+8 -5
+7 -5
fs/quota/netlink.c
··· 47 47 void *msg_head; 48 48 int ret; 49 49 int msg_size = 4 * nla_total_size(sizeof(u32)) + 50 - 2 * nla_total_size(sizeof(u64)); 50 + 2 * nla_total_size_64bit(sizeof(u64)); 51 51 52 52 /* We have to allocate using GFP_NOFS as we are called from a 53 53 * filesystem performing write and thus further recursion into ··· 68 68 ret = nla_put_u32(skb, QUOTA_NL_A_QTYPE, qid.type); 69 69 if (ret) 70 70 goto attr_err_out; 71 - ret = nla_put_u64(skb, QUOTA_NL_A_EXCESS_ID, 72 - from_kqid_munged(&init_user_ns, qid)); 71 + ret = nla_put_u64_64bit(skb, QUOTA_NL_A_EXCESS_ID, 72 + from_kqid_munged(&init_user_ns, qid), 73 + QUOTA_NL_A_PAD); 73 74 if (ret) 74 75 goto attr_err_out; 75 76 ret = nla_put_u32(skb, QUOTA_NL_A_WARNING, warntype); ··· 82 81 ret = nla_put_u32(skb, QUOTA_NL_A_DEV_MINOR, MINOR(dev)); 83 82 if (ret) 84 83 goto attr_err_out; 85 - ret = nla_put_u64(skb, QUOTA_NL_A_CAUSED_ID, 86 - from_kuid_munged(&init_user_ns, current_uid())); 84 + ret = nla_put_u64_64bit(skb, QUOTA_NL_A_CAUSED_ID, 85 + from_kuid_munged(&init_user_ns, current_uid()), 86 + QUOTA_NL_A_PAD); 87 87 if (ret) 88 88 goto attr_err_out; 89 89 genlmsg_end(skb, msg_head);
+1
include/uapi/linux/quota.h
··· 191 191 QUOTA_NL_A_DEV_MAJOR, 192 192 QUOTA_NL_A_DEV_MINOR, 193 193 QUOTA_NL_A_CAUSED_ID, 194 + QUOTA_NL_A_PAD, 194 195 __QUOTA_NL_A_MAX, 195 196 }; 196 197 #define QUOTA_NL_A_MAX (__QUOTA_NL_A_MAX - 1)