#include <linux/fs.h>
#include <linux/namei.h>
#include <linux/slab.h>
#include <asm/current.h>
#include <linux/blkdev.h>
#include <linux/uaccess.h>
#include <linux/kernel.h>
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/capability.h>
#include <linux/quotaops.h>
#include <linux/types.h>
#include <linux/mount.h>
#include <linux/writeback.h>
#include <linux/nospec.h>
#include "compat.h"
#include "../internal.h"
static int check_quotactl_permission(struct super_block *sb, int type, int cmd,
qid_t id)
{ … }
static void quota_sync_one(struct super_block *sb, void *arg)
{ … }
static int quota_sync_all(int type)
{ … }
unsigned int qtype_enforce_flag(int type)
{ … }
static int quota_quotaon(struct super_block *sb, int type, qid_t id,
const struct path *path)
{ … }
static int quota_quotaoff(struct super_block *sb, int type)
{ … }
static int quota_getfmt(struct super_block *sb, int type, void __user *addr)
{ … }
static int quota_getinfo(struct super_block *sb, int type, void __user *addr)
{ … }
static int quota_setinfo(struct super_block *sb, int type, void __user *addr)
{ … }
static inline qsize_t qbtos(qsize_t blocks)
{ … }
static inline qsize_t stoqb(qsize_t space)
{ … }
static void copy_to_if_dqblk(struct if_dqblk *dst, struct qc_dqblk *src)
{ … }
static int quota_getquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static int quota_getnextquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static void copy_from_if_dqblk(struct qc_dqblk *dst, struct if_dqblk *src)
{ … }
static int quota_setquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static int quota_enable(struct super_block *sb, void __user *addr)
{ … }
static int quota_disable(struct super_block *sb, void __user *addr)
{ … }
static int quota_state_to_flags(struct qc_state *state)
{ … }
static int quota_getstate(struct super_block *sb, int type,
struct fs_quota_stat *fqs)
{ … }
static int compat_copy_fs_qfilestat(struct compat_fs_qfilestat __user *to,
struct fs_qfilestat *from)
{ … }
static int compat_copy_fs_quota_stat(struct compat_fs_quota_stat __user *to,
struct fs_quota_stat *from)
{ … }
static int quota_getxstate(struct super_block *sb, int type, void __user *addr)
{ … }
static int quota_getstatev(struct super_block *sb, int type,
struct fs_quota_statv *fqs)
{ … }
static int quota_getxstatev(struct super_block *sb, int type, void __user *addr)
{ … }
#define XFS_BB_SHIFT …
static inline u64 quota_bbtob(u64 blocks)
{ … }
static inline u64 quota_btobb(u64 bytes)
{ … }
static inline s64 copy_from_xfs_dqblk_ts(const struct fs_disk_quota *d,
__s32 timer, __s8 timer_hi)
{ … }
static void copy_from_xfs_dqblk(struct qc_dqblk *dst, struct fs_disk_quota *src)
{ … }
static void copy_qcinfo_from_xfs_dqblk(struct qc_info *dst,
struct fs_disk_quota *src)
{ … }
static int quota_setxquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static inline void copy_to_xfs_dqblk_ts(const struct fs_disk_quota *d,
__s32 *timer_lo, __s8 *timer_hi, s64 timer)
{ … }
static inline bool want_bigtime(s64 timer)
{ … }
static void copy_to_xfs_dqblk(struct fs_disk_quota *dst, struct qc_dqblk *src,
int type, qid_t id)
{ … }
static int quota_getxquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static int quota_getnextxquota(struct super_block *sb, int type, qid_t id,
void __user *addr)
{ … }
static int quota_rmxquota(struct super_block *sb, void __user *addr)
{ … }
static int do_quotactl(struct super_block *sb, int type, int cmd, qid_t id,
void __user *addr, const struct path *path)
{ … }
static int quotactl_cmd_write(int cmd)
{ … }
static bool quotactl_cmd_onoff(int cmd)
{ … }
static struct super_block *quotactl_block(const char __user *special, int cmd)
{ … }
SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
qid_t, id, void __user *, addr)
{ … }
SYSCALL_DEFINE4(quotactl_fd, unsigned int, fd, unsigned int, cmd,
qid_t, id, void __user *, addr)
{ … }