size_t count, loff_t *ppos);
static loff_t proc_file_lseek(struct file *, loff_t, int);
size_t count, loff_t *ppos);
static loff_t proc_file_lseek(struct file *, loff_t, int);
proc_file_read(struct file *file, char __user *buf, size_t nbytes,
loff_t *ppos)
{
proc_file_read(struct file *file, char __user *buf, size_t nbytes,
loff_t *ppos)
{
proc_file_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{
proc_file_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{
const char *cp = name, *next;
struct proc_dir_entry *de;
int len;
const char *cp = name, *next;
struct proc_dir_entry *de;
int len;
if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
unsigned int ino = de->low_ino;
if (!memcmp(dentry->d_name.name, de->name, de->namelen)) {
unsigned int ino = de->low_ino;
error = -EINVAL;
inode = proc_get_inode(dir->i_sb, ino, de);
/* generic proc entries belong to the host */
error = -EINVAL;
inode = proc_get_inode(dir->i_sb, ino, de);
/* generic proc entries belong to the host */
/* fall through */
case 1:
if (filldir(dirent, "..", 2, i,
/* fall through */
case 1:
if (filldir(dirent, "..", 2, i,
if (filldir(dirent, de->name, de->namelen, filp->f_pos,
de->low_ino, de->mode >> 12) < 0)
goto out;
if (filldir(dirent, de->name, de->namelen, filp->f_pos,
de->low_ino, de->mode >> 12) < 0)
goto out;
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file * filp = list_entry(p, struct file, f_u.fu_list);
file_list_lock();
list_for_each(p, &sb->s_files) {
struct file * filp = list_entry(p, struct file, f_u.fu_list);
for (p = &parent->subdir; *p; p=&(*p)->next ) {
if (!proc_match(len, fn, *p))
continue;
for (p = &parent->subdir; *p; p=&(*p)->next ) {
if (!proc_match(len, fn, *p))
continue;