type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | void mnt_pin(struct vfsmount *mnt)
{
spin_lock(&vfsmount_lock);
mnt->mnt_pinned++;
spin_unlock(&vfsmount_lock);
} |
functions | void mnt_unpin(struct vfsmount *mnt)
{
spin_lock(&vfsmount_lock);
if (mnt->mnt_pinned) {
atomic_inc(&mnt->mnt_count);
mnt->mnt_pinned--;
} |
functions | void mangle(struct seq_file *m, const char *s)
{
seq_escape(m, s, " \t\n\\");
} |
functions | int generic_show_options(struct seq_file *m, struct vfsmount *mnt)
{
const char *options;
rcu_read_lock();
options = rcu_dereference(mnt->mnt_sb->s_options);
if (options != NULL && options[0]) {
seq_putc(m, ',');
mangle(m, options);
} |
functions | void save_mount_options(struct super_block *sb, char *options)
{
BUG_ON(sb->s_options);
rcu_assign_pointer(sb->s_options, kstrdup(options, GFP_KERNEL));
} |
functions | void replace_mount_options(struct super_block *sb, char *options)
{
char *old = sb->s_options;
rcu_assign_pointer(sb->s_options, options);
if (old) {
synchronize_rcu();
kfree(old);
} |
functions | void m_stop(struct seq_file *m, void *v)
{
up_read(&namespace_sem);
} |
functions | int show_sb_opts(struct seq_file *m, struct super_block *sb)
{
static const struct proc_fs_info fs_info[] = {
{ MS_SYNCHRONOUS, ",sync" } |
functions | void show_mnt_opts(struct seq_file *m, struct vfsmount *mnt)
{
static const struct proc_fs_info mnt_info[] = {
{ MNT_NOSUID, ",nosuid" } |
functions | void show_type(struct seq_file *m, struct super_block *sb)
{
mangle(m, sb->s_type->name);
if (sb->s_subtype && sb->s_subtype[0]) {
seq_putc(m, '.');
mangle(m, sb->s_subtype);
} |
functions | int show_vfsmnt(struct seq_file *m, void *v)
{
struct vfsmount *mnt = list_entry(v, struct vfsmount, mnt_list);
int err = 0;
struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt } |
functions | int show_mountinfo(struct seq_file *m, void *v)
{
struct proc_mounts *p = m->private;
struct vfsmount *mnt = list_entry(v, struct vfsmount, mnt_list);
struct super_block *sb = mnt->mnt_sb;
struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt } |
functions | int show_vfsstat(struct seq_file *m, void *v)
{
struct vfsmount *mnt = list_entry(v, struct vfsmount, mnt_list);
struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt } |
functions | int may_umount_tree(struct vfsmount *mnt)
{
int actual_refs = 0;
int minimum_refs = 0;
struct vfsmount *p;
spin_lock(&vfsmount_lock);
for (p = mnt; p; p = next_mnt(p, mnt)) {
actual_refs += atomic_read(&p->mnt_count);
minimum_refs += 2;
} |
functions | int may_umount(struct vfsmount *mnt)
{
int ret = 1;
down_read(&namespace_sem);
spin_lock(&vfsmount_lock);
if (propagate_mount_busy(mnt, 2))
ret = 0;
spin_unlock(&vfsmount_lock);
up_read(&namespace_sem);
return ret;
} |
functions | void release_mounts(struct list_head *head)
{
struct vfsmount *mnt;
while (!list_empty(head)) {
mnt = list_first_entry(head, struct vfsmount, mnt_hash);
list_del_init(&mnt->mnt_hash);
if (mnt->mnt_parent != mnt) {
struct dentry *dentry;
struct vfsmount *m;
spin_lock(&vfsmount_lock);
dentry = mnt->mn... |
functions | void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill)
{
struct vfsmount *p;
for (p = mnt; p; p = next_mnt(p, mnt))
list_move(&p->mnt_hash, kill);
if (propagate)
propagate_umount(kill);
list_for_each_entry(p, kill, mnt_hash) {
list_del_init(&p->mnt_expire);
list_del_init(&p->mnt_li... |
functions | int do_umount(struct vfsmount *mnt, int flags)
{
struct super_block *sb = mnt->mnt_sb;
int retval;
LIST_HEAD(umount_list);
retval = security_sb_umount(mnt, flags);
if (retval)
return retval;
/*
* Allow userspace to request a mountpoint be expired rather than
* unmounting unconditionally. Unmount only happ... |
functions | int mount_is_safe(struct path *path)
{
if (capable(CAP_SYS_ADMIN))
return 0;
return -EPERM;
#ifdef notyet
if (S_ISLNK(path->dentry->d_inode->i_mode))
return -EPERM;
if (path->dentry->d_inode->i_mode & S_ISVTX) {
if (current_uid() != path->dentry->d_inode->i_uid)
return -EPERM;
} |
functions | void drop_collected_mounts(struct vfsmount *mnt)
{
LIST_HEAD(umount_list);
down_write(&namespace_sem);
spin_lock(&vfsmount_lock);
umount_tree(mnt, 0, &umount_list);
spin_unlock(&vfsmount_lock);
up_write(&namespace_sem);
release_mounts(&umount_list);
} |
functions | void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end)
{
struct vfsmount *p;
for (p = mnt; p != end; p = next_mnt(p, mnt)) {
if (p->mnt_group_id && !IS_MNT_SHARED(p))
mnt_release_group_id(p);
} |
functions | int invent_group_ids(struct vfsmount *mnt, bool recurse)
{
struct vfsmount *p;
for (p = mnt; p; p = recurse ? next_mnt(p, mnt) : NULL) {
if (!p->mnt_group_id && !IS_MNT_SHARED(p)) {
int err = mnt_alloc_group_id(p);
if (err) {
cleanup_group_ids(mnt, p);
return err;
} |
functions | int attach_recursive_mnt(struct vfsmount *source_mnt,
struct path *path, struct path *parent_path)
{
LIST_HEAD(tree_list);
struct vfsmount *dest_mnt = path->mnt;
struct dentry *dest_dentry = path->dentry;
struct vfsmount *child, *p;
int err;
if (IS_MNT_SHARED(dest_mnt)) {
err = invent_group_ids(source_mnt, ... |
functions | int graft_tree(struct vfsmount *mnt, struct path *path)
{
int err;
if (mnt->mnt_sb->s_flags & MS_NOUSER)
return -EINVAL;
if (S_ISDIR(path->dentry->d_inode->i_mode) !=
S_ISDIR(mnt->mnt_root->d_inode->i_mode))
return -ENOTDIR;
err = -ENOENT;
mutex_lock(&path->dentry->d_inode->i_mutex);
if (IS_DEADDIR(p... |
functions | int do_change_type(struct path *path, int flag)
{
struct vfsmount *m, *mnt = path->mnt;
int recurse = flag & MS_REC;
int type = flag & ~MS_REC;
int err = 0;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (path->dentry != path->mnt->mnt_root)
return -EINVAL;
down_write(&namespace_sem);
if (type == MS_SHAR... |
functions | int do_loopback(struct path *path, char *old_name,
int recurse)
{
struct path old_path;
struct vfsmount *mnt = NULL;
int err = mount_is_safe(path);
if (err)
return err;
if (!old_name || !*old_name)
return -EINVAL;
err = kern_path(old_name, LOOKUP_FOLLOW, &old_path);
if (err)
return err;
down_write(&n... |
functions | int change_mount_flags(struct vfsmount *mnt, int ms_flags)
{
int error = 0;
int readonly_request = 0;
if (ms_flags & MS_RDONLY)
readonly_request = 1;
if (readonly_request == __mnt_is_readonly(mnt))
return 0;
if (readonly_request)
error = mnt_make_readonly(mnt);
else
__mnt_unmake_readonly(mnt);
return e... |
functions | int do_remount(struct path *path, int flags, int mnt_flags,
void *data)
{
int err;
struct super_block *sb = path->mnt->mnt_sb;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (!check_mnt(path->mnt))
return -EINVAL;
if (path->dentry != path->mnt->mnt_root)
return -EINVAL;
down_write(&sb->s_umount)... |
functions | int tree_contains_unbindable(struct vfsmount *mnt)
{
struct vfsmount *p;
for (p = mnt; p; p = next_mnt(p, mnt)) {
if (IS_MNT_UNBINDABLE(p))
return 1;
} |
functions | int do_move_mount(struct path *path, char *old_name)
{
struct path old_path, parent_path;
struct vfsmount *p;
int err = 0;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (!old_name || !*old_name)
return -EINVAL;
err = kern_path(old_name, LOOKUP_FOLLOW, &old_path);
if (err)
return err;
down_write(&namespa... |
functions | int do_new_mount(struct path *path, char *type, int flags,
int mnt_flags, char *name, void *data)
{
struct vfsmount *mnt;
if (!type)
return -EINVAL;
/* we need capabilities... */
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
lock_kernel();
mnt = do_kern_mount(type, flags, name, data);
unlock_kernel();
i... |
functions | int do_add_mount(struct vfsmount *newmnt, struct path *path,
int mnt_flags, struct list_head *fslist)
{
int err;
mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD);
down_write(&namespace_sem);
/* Something was mounted here while we slept */
while (d_mountpoint(path->dentry) &&
follow_down(path))
;
err = -... |
functions | void mark_mounts_for_expiry(struct list_head *mounts)
{
struct vfsmount *mnt, *next;
LIST_HEAD(graveyard);
LIST_HEAD(umounts);
if (list_empty(mounts))
return;
down_write(&namespace_sem);
spin_lock(&vfsmount_lock);
/* extract from the expiration list every vfsmount that matches the
* following criteria:
... |
functions | int select_submounts(struct vfsmount *parent, struct list_head *graveyard)
{
struct vfsmount *this_parent = parent;
struct list_head *next;
int found = 0;
repeat:
next = this_parent->mnt_mounts.next;
resume:
while (next != &this_parent->mnt_mounts) {
struct list_head *tmp = next;
struct vfsmount *mnt = list_e... |
functions | void shrink_submounts(struct vfsmount *mnt, struct list_head *umounts)
{
LIST_HEAD(graveyard);
struct vfsmount *m;
/* extract submounts of 'mountpoint' from the expiration list */
while (select_submounts(mnt, &graveyard)) {
while (!list_empty(&graveyard)) {
m = list_first_entry(&graveyard, struct vfsmount,
... |
functions | long exact_copy_from_user(void *to, const void __user * from,
unsigned long n)
{
char *t = to;
const char __user *f = from;
char c;
if (!access_ok(VERIFY_READ, from, n))
return n;
while (n) {
if (__get_user(c, f)) {
memset(t, 0, n);
break;
} |
functions | int copy_mount_options(const void __user * data, unsigned long *where)
{
int i;
unsigned long page;
unsigned long size;
*where = 0;
if (!data)
return 0;
if (!(page = __get_free_page(GFP_KERNEL)))
return -ENOMEM;
/* We only care that *some* data at the address the user
* gave us is valid. Just in case, ... |
functions | int copy_mount_string(const void __user *data, char **where)
{
char *tmp;
if (!data) {
*where = NULL;
return 0;
} |
functions | long do_mount(char *dev_name, char *dir_name, char *type_page,
unsigned long flags, void *data_page)
{
struct path path;
int retval = 0;
int mnt_flags = 0;
/* Discard magic */
if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
flags &= ~MS_MGC_MSK;
/* Basic sanity checks */
if (!dir_name || !*dir_name || !memchr(d... |
functions | __init init_mount_tree(void)
{
struct vfsmount *mnt;
struct mnt_namespace *ns;
struct path root;
mnt = do_kern_mount("rootfs", 0, "rootfs", NULL);
if (IS_ERR(mnt))
panic("Can't create rootfs");
ns = create_mnt_ns(mnt);
if (IS_ERR(ns))
panic("Can't allocate initial namespace");
init_task.nsproxy->mnt_ns = ... |
functions | __init mnt_init(void)
{
unsigned u;
int err;
init_rwsem(&namespace_sem);
mnt_cache = kmem_cache_create("mnt_cache", sizeof(struct vfsmount),
0, SLAB_HWCACHE_ALIGN | SLAB_PANIC, NULL);
mount_hashtable = (struct list_head *)__get_free_page(GFP_ATOMIC);
if (!mount_hashtable)
panic("Failed to allocate mount ... |
functions | void put_mnt_ns(struct mnt_namespace *ns)
{
struct vfsmount *root;
LIST_HEAD(umount_list);
if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
return;
root = ns->root;
ns->root = NULL;
spin_unlock(&vfsmount_lock);
down_write(&namespace_sem);
spin_lock(&vfsmount_lock);
umount_tree(root, 0, &umount_list);
... |
defines |
#define EXACT(N) \ |
defines |
#define LARGER(N) \ |
defines | #define BUF 1024 |
functions | void
libat_exchange (size_t n, void *mptr, void *vptr, void *rptr, int smodel)
{
union max_size_u u, v;
uintptr_t r, a;
switch (n)
{
case 0: return;
case 1: EXACT(1); goto L4;
case 2: EXACT(2); goto L4;
case 4: EXACT(4); goto L8;
case 8: EXACT(8); goto L16;
case 16: EXACT(16);... |
includes |
#include <linux/module.h> |
includes | #include <linux/moduleparam.h> |
includes | #include <linux/pci.h> |
includes | #include <linux/kernel.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/stddef.h> |
includes | #include <linux/ioport.h> |
includes | #include <linux/i2c.h> |
includes | #include <linux/init.h> |
includes | #include <linux/apm_bios.h> |
includes | #include <linux/dmi.h> |
includes | #include <asm/io.h> |
defines | #define SMBHSTSTS (0 + piix4_smba) |
defines | #define SMBHSLVSTS (1 + piix4_smba) |
defines | #define SMBHSTCNT (2 + piix4_smba) |
defines | #define SMBHSTCMD (3 + piix4_smba) |
defines | #define SMBHSTADD (4 + piix4_smba) |
defines | #define SMBHSTDAT0 (5 + piix4_smba) |
defines | #define SMBHSTDAT1 (6 + piix4_smba) |
defines | #define SMBBLKDAT (7 + piix4_smba) |
defines | #define SMBSLVCNT (8 + piix4_smba) |
defines | #define SMBSHDWCMD (9 + piix4_smba) |
defines | #define SMBSLVEVT (0xA + piix4_smba) |
defines | #define SMBSLVDAT (0xC + piix4_smba) |
defines | #define SMBIOSIZE 8 |
defines | #define SMBBA 0x090 |
defines | #define SMBHSTCFG 0x0D2 |
defines | #define SMBSLVC 0x0D3 |
defines | #define SMBSHDW1 0x0D4 |
defines | #define SMBSHDW2 0x0D5 |
defines | #define SMBREV 0x0D6 |
defines | #define MAX_TIMEOUT 500 |
defines | #define ENABLE_INT9 0 |
defines | #define PIIX4_QUICK 0x00 |
defines | #define PIIX4_BYTE 0x04 |
defines | #define PIIX4_BYTE_DATA 0x08 |
defines | #define PIIX4_WORD_DATA 0x0C |
defines | #define PIIX4_BLOCK_DATA 0x14 |
structs | struct sd {
const unsigned short mfr;
const unsigned short dev;
const unsigned char fn;
const char *name;
}; |
functions | __devinit piix4_setup(struct pci_dev *PIIX4_dev,
const struct pci_device_id *id)
{
unsigned char temp;
dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
/* Don't access SMBus on IBM systems which get corrupted eeproms */
if (dmi_check_system(piix4_dmi_table) &&
PIIX4_dev->vendor == PCI_V... |
functions | int piix4_transaction(void)
{
int temp;
int result = 0;
int timeout = 0;
dev_dbg(&piix4_adapter.dev, "Transaction (pre): CNT=%02x, CMD=%02x, "
"ADD=%02x, DAT0=%02x, DAT1=%02x\n", inb_p(SMBHSTCNT),
inb_p(SMBHSTCMD), inb_p(SMBHSTADD), inb_p(SMBHSTDAT0),
inb_p(SMBHSTDAT1));
/* Make sure the SMBus host is read... |
functions | s32 piix4_access(struct i2c_adapter * adap, u16 addr,
unsigned short flags, char read_write,
u8 command, int size, union i2c_smbus_data * data)
{
int i, len;
switch (size) {
case I2C_SMBUS_PROC_CALL:
dev_err(&adap->dev, "I2C_SMBUS_PROC_CALL not supported!\n");
return -1;
case I2C_SMBUS_QUICK:
outb_p(((... |
functions | u32 piix4_func(struct i2c_adapter *adapter)
{
return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
I2C_FUNC_SMBUS_BLOCK_DATA;
} |
functions | __devinit piix4_probe(struct pci_dev *dev,
const struct pci_device_id *id)
{
int retval;
retval = piix4_setup(dev, id);
if (retval)
return retval;
/* set up the sysfs linkage to our parent device */
piix4_adapter.dev.parent = &dev->dev;
snprintf(piix4_adapter.name, sizeof(piix4_adapter.name),
"SMBus PI... |
functions | __devexit piix4_remove(struct pci_dev *dev)
{
if (piix4_smba) {
i2c_del_adapter(&piix4_adapter);
release_region(piix4_smba, SMBIOSIZE);
piix4_smba = 0;
} |
functions | __init i2c_piix4_init(void)
{
return pci_register_driver(&piix4_driver);
} |
functions | __exit i2c_piix4_exit(void)
{
pci_unregister_driver(&piix4_driver);
} |
includes | #include <hsad/config_data.h> |
includes | #include <hsad/config_general_struct.h> |
includes | #include <linux/fs.h> |
includes | #include <linux/backing-dev.h> |
includes | #include <linux/stat.h> |
includes | #include <linux/fcntl.h> |
includes | #include <linux/pagemap.h> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.