Commit 5770cca7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Import 2.1.78pre1

parent c7c53f5b
DE10x
=====
Memory Addresses:
SW1 SW2 SW3 SW4
64K on on on on d0000 dbfff
off on on on c0000 cbfff
off off on on e0000 ebfff
32K on on off on d8000 dbfff
off on off on c8000 cbfff
off off off on e8000 ebfff
DBR ROM on on dc000 dffff
off on cc000 cffff
off off ec000 effff
Note that the 2K mode is set by SW3/SW4 on/off or off/off. Address
assignment is through the RBSA register.
I/O Address:
SW5
0x300 on
0x200 off
Remote Boot:
SW6
Disable on
Enable off
Remote Boot Timeout:
SW7
2.5min on
30s off
IRQ:
SW8 SW9 SW10 SW11 SW12
2 on off off off off
3 off on off off off
4 off off on off off
5 off off off on off
7 off off off off on
DE20x
=====
Memory Size:
SW3 SW4
64K on on
32K off on
2K on off
2K off off
Start Addresses:
SW1 SW2 SW3 SW4
64K on on on on c0000 cffff
on off on on d0000 dffff
off on on on e0000 effff
32K on on off off c8000 cffff
on off off off d8000 dffff
off on off off e8000 effff
Illegal off off - - - -
I/O Address:
SW5
0x300 on
0x200 off
Remote Boot:
SW6
Disable on
Enable off
Remote Boot Timeout:
SW7
2.5min on
30s off
IRQ:
SW8 SW9 SW10 SW11 SW12
5 on off off off off
9 off on off off off
10 off off on off off
11 off off off on off
15 off off off off on
VERSION = 2
PATCHLEVEL = 1
SUBLEVEL = 77
SUBLEVEL = 78
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
......
......@@ -220,8 +220,9 @@ affs_write_inode(struct inode *inode)
}
int
affs_notify_change(struct inode *inode, struct iattr *attr)
affs_notify_change(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
int error;
pr_debug("AFFS: notify_change(%lu,0x%x)\n",inode->i_ino,attr->ia_valid);
......
......@@ -19,8 +19,8 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
static int affs_readlink(struct inode *, char *, int);
static struct dentry *affs_follow_link(struct inode *inode, struct dentry *base);
static int affs_readlink(struct dentry *, char *, int);
static struct dentry *affs_follow_link(struct dentry *dentry, struct dentry *base);
struct inode_operations affs_symlink_inode_operations = {
NULL, /* no file-operations */
......@@ -44,8 +44,9 @@ struct inode_operations affs_symlink_inode_operations = {
};
static int
affs_readlink(struct inode *inode, char *buffer, int buflen)
affs_readlink(struct inode *dentry, char *buffer, int buflen)
{
struct inode *inode = dentry->d_inode;
struct buffer_head *bh;
struct slink_front *lf;
int i, j;
......@@ -97,8 +98,9 @@ affs_readlink(struct inode *inode, char *buffer, int buflen)
}
static struct dentry *
affs_follow_link(struct inode *inode, struct dentry *base)
affs_follow_link(struct dentry *dentry, struct dentry *base)
{
struct inode *inode = dentry->d_inode;
struct buffer_head *bh;
struct slink_front *lf;
char *buffer;
......
......@@ -81,8 +81,9 @@ void inode_setattr(struct inode * inode, struct iattr * attr)
mark_inode_dirty(inode);
}
int notify_change(struct inode * inode, struct iattr * attr)
int notify_change(struct dentry * dentry, struct iattr * attr)
{
struct inode *inode = dentry->d_inode;
int error;
time_t now = CURRENT_TIME;
unsigned int ia_valid = attr->ia_valid;
......@@ -93,11 +94,13 @@ int notify_change(struct inode * inode, struct iattr * attr)
if (!(ia_valid & ATTR_MTIME_SET))
attr->ia_mtime = now;
if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->notify_change)
return inode->i_sb->s_op->notify_change(inode, attr);
error = inode_change_ok(inode, attr);
if (!error)
inode_setattr(inode, attr);
if (inode->i_sb && inode->i_sb->s_op &&
inode->i_sb->s_op->notify_change)
error = inode->i_sb->s_op->notify_change(dentry, attr);
else {
error = inode_change_ok(inode, attr);
if (!error)
inode_setattr(inode, attr);
}
return error;
}
......@@ -14,23 +14,24 @@
#include <linux/sched.h>
#include "autofs_i.h"
static int autofs_readlink(struct inode *inode, char *buffer, int buflen)
static int autofs_readlink(struct dentry *dentry, char *buffer, int buflen)
{
struct autofs_symlink *sl;
int len;
sl = (struct autofs_symlink *)inode->u.generic_ip;
sl = (struct autofs_symlink *)dentry->d_inode->u.generic_ip;
len = sl->len;
if (len > buflen) len = buflen;
copy_to_user(buffer,sl->data,len);
copy_to_user(buffer, sl->data, len);
return len;
}
static struct dentry * autofs_follow_link(struct inode *inode, struct dentry *base)
static struct dentry * autofs_follow_link(struct dentry *dentry,
struct dentry *base)
{
struct autofs_symlink *sl;
sl = (struct autofs_symlink *)inode->u.generic_ip;
sl = (struct autofs_symlink *)dentry->d_inode->u.generic_ip;
return lookup_dentry(sl->data, base, 1);
}
......
......@@ -13,7 +13,7 @@
/*
* The follow_symlink operation must dput() the base.
*/
static struct dentry * bad_follow_link(struct inode * ino, struct dentry *base)
static struct dentry * bad_follow_link(struct dentry *dent, struct dentry *base)
{
dput(base);
return ERR_PTR(-EIO);
......
......@@ -1522,8 +1522,9 @@ void mark_buffer_uptodate(struct buffer_head * bh, int on)
* mark_buffer_uptodate() functions propagate buffer state into the
* page struct once IO has completed.
*/
int generic_readpage(struct inode * inode, struct page * page)
int generic_readpage(struct dentry * dentry, struct page * page)
{
struct inode *inode = dentry->d_inode;
unsigned long block;
int *p, nr[PAGE_SIZE/512];
int i;
......
......@@ -25,10 +25,10 @@
#include <linux/coda_cache.h>
/* file operations */
static int coda_readpage(struct inode * inode, struct page * page);
static ssize_t coda_file_read(struct file *f, char *buf, size_t count, loff_t *off);
static ssize_t coda_file_write(struct file *f, const char *buf, size_t count, loff_t *off);
static int coda_file_mmap(struct file * file, struct vm_area_struct * vma);
static int coda_readpage(struct dentry *, struct page *);
static ssize_t coda_file_read(struct file *, char *, size_t, loff_t *);
static ssize_t coda_file_write(struct file *, const char *, size_t, loff_t *);
static int coda_file_mmap(struct file *, struct vm_area_struct *);
/* exported from this file */
int coda_fsync(struct file *, struct dentry *dentry);
......@@ -74,9 +74,9 @@ struct file_operations coda_file_operations = {
};
/* File file operations */
static int coda_readpage(struct inode * inode, struct page * page)
static int coda_readpage(struct dentry *dentry, struct page * page)
{
struct inode *open_inode;
struct inode *open_inode, *inode = dentry->d_inode;
struct cnode *cnp;
ENTRY;
......@@ -93,6 +93,7 @@ static int coda_readpage(struct inode * inode, struct page * page)
CDEBUG(D_INODE, "coda ino: %ld, cached ino %ld, page offset: %lx\n", inode->i_ino, open_inode->i_ino, page->offset);
/* N.B. This needs the dentry for open_inode */
generic_readpage(open_inode, page);
EXIT;
return 0;
......
......@@ -41,7 +41,7 @@
/* VFS super_block ops */
static struct super_block *coda_read_super(struct super_block *, void *, int);
static void coda_read_inode(struct inode *);
static int coda_notify_change(struct inode *inode, struct iattr *attr);
static int coda_notify_change(struct dentry *, struct iattr *);
static void coda_put_inode(struct inode *);
static void coda_delete_inode(struct inode *);
static void coda_put_super(struct super_block *);
......@@ -133,6 +133,7 @@ static struct super_block * coda_read_super(struct super_block *sb,
printk("coda_read_super: rootinode is %ld dev %d\n",
root->i_ino, root->i_dev);
sbi->sbi_root = root;
/* N.B. check this for failure */
sb->s_root = d_alloc_root(root, NULL);
unlock_super(sb);
EXIT;
......@@ -140,7 +141,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
error:
EXIT;
MOD_DEC_USE_COUNT;
if (sbi) {
sbi->sbi_vcomm = NULL;
sbi->sbi_root = NULL;
......@@ -154,6 +154,7 @@ EXIT;
coda_cnode_free(ITOC(root));
}
sb->s_dev = 0;
MOD_DEC_USE_COUNT;
return NULL;
}
......@@ -224,8 +225,9 @@ static void coda_delete_inode(struct inode *inode)
EXIT;
}
static int coda_notify_change(struct inode *inode, struct iattr *iattr)
static int coda_notify_change(struct dentry *dentry, struct iattr *iattr)
{
struct inode *inode = dentry->d_inode;
struct cnode *cnp;
struct coda_vattr vattr;
int error;
......
......@@ -24,8 +24,8 @@
#include <linux/coda_cnode.h>
#include <linux/coda_cache.h>
static int coda_readlink(struct inode *inode, char *buffer, int length);
static struct dentry *coda_follow_link(struct inode *, struct dentry *);
static int coda_readlink(struct dentry *dentry, char *buffer, int length);
static struct dentry *coda_follow_link(struct dentry *, struct dentry *);
struct inode_operations coda_symlink_inode_operations = {
NULL, /* no file-operations */
......@@ -50,8 +50,9 @@ struct inode_operations coda_symlink_inode_operations = {
NULL /* revalidate */
};
static int coda_readlink(struct inode *inode, char *buffer, int length)
static int coda_readlink(struct inode *dentry, char *buffer, int length)
{
struct inode *inode = dentry->d_inode;
int len;
int error;
char *buf;
......@@ -83,14 +84,15 @@ static int coda_readlink(struct inode *inode, char *buffer, int length)
return error;
}
static struct dentry *coda_follow_link(struct inode *inode,
struct dentry *base)
static struct dentry *coda_follow_link(struct dentry *dentry,
struct dentry *base)
{
struct inode *inode = dentry->d_inode;
int error;
struct cnode *cnp;
unsigned int len;
char mem[CFS_MAXPATHLEN];
char *path;
char mem[CFS_MAXPATHLEN]; /* N.B. too big for the stack? */
ENTRY;
CDEBUG(D_INODE, "(%x/%ld)\n", inode->i_dev, inode->i_ino);
......
......@@ -52,6 +52,8 @@ struct {
static inline void d_free(struct dentry *dentry)
{
if (dentry->d_op && dentry->d_op->d_release)
dentry->d_op->d_release(dentry);
kfree(dentry->d_name.name);
kfree(dentry);
}
......@@ -502,6 +504,7 @@ printk("d_alloc: %d unused, pruning dcache\n", dentry_stat.nr_unused);
dentry->d_name.len = name->len;
dentry->d_name.hash = name->hash;
dentry->d_op = NULL;
dentry->d_fsdata = NULL;
return dentry;
}
......
......@@ -631,23 +631,25 @@ int ext2_sync_inode (struct inode *inode)
return ext2_update_inode (inode, 1);
}
int ext2_notify_change(struct inode *inode, struct iattr *iattr)
int ext2_notify_change(struct dentry *dentry, struct iattr *iattr)
{
struct inode *inode = dentry->d_inode;
int retval;
unsigned int flags;
retval = -EPERM;
if ((iattr->ia_attr_flags &
(ATTR_FLAG_APPEND | ATTR_FLAG_IMMUTABLE)) ^
(inode->u.ext2_i.i_flags &
(EXT2_APPEND_FL | EXT2_IMMUTABLE_FL))) {
if (securelevel > 0 || !fsuser())
return -EPERM;
} else
if ((current->fsuid != inode->i_uid) && !fsuser())
return -EPERM;
goto out;
} else if ((current->fsuid != inode->i_uid) && !fsuser())
goto out;
if ((retval = inode_change_ok(inode, iattr)) != 0)
return retval;
retval = inode_change_ok(inode, iattr);
if (retval != 0)
goto out;
inode_setattr(inode, iattr);
......@@ -681,7 +683,7 @@ int ext2_notify_change(struct inode *inode, struct iattr *iattr)
inode->u.ext2_i.i_flags &= ~EXT2_IMMUTABLE_FL;
}
mark_inode_dirty(inode);
return 0;
out:
return retval;
}
......@@ -793,8 +793,10 @@ int ext2_symlink (struct inode * dir, struct dentry *dentry, const char * symnam
goto out;
}
int ext2_link (struct inode * inode, struct inode * dir, struct dentry *dentry)
int ext2_link (struct dentry * old_dentry,
struct inode * dir, struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;
struct ext2_dir_entry * de;
struct buffer_head * bh;
int err;
......
......@@ -24,8 +24,8 @@
#include <linux/mm.h>
#include <linux/stat.h>
static int ext2_readlink (struct inode *, char *, int);
static struct dentry *ext2_follow_link(struct inode *, struct dentry *);
static int ext2_readlink (struct dentry *, char *, int);
static struct dentry *ext2_follow_link(struct dentry *, struct dentry *);
/*
* symlinks can't do much...
......@@ -51,10 +51,12 @@ struct inode_operations ext2_symlink_inode_operations = {
NULL /* smap */
};
static struct dentry * ext2_follow_link(struct inode * inode, struct dentry *base)
static struct dentry * ext2_follow_link(struct dentry * dentry,
struct dentry *base)
{
int error;
struct inode *inode = dentry->d_inode;
struct buffer_head * bh = NULL;
int error;
char * link;
link = (char *) inode->u.ext2_i.i_data;
......@@ -72,8 +74,9 @@ static struct dentry * ext2_follow_link(struct inode * inode, struct dentry *bas
return base;
}
static int ext2_readlink (struct inode * inode, char * buffer, int buflen)
static int ext2_readlink (struct dentry * dentry, char * buffer, int buflen)
{
struct inode *inode = dentry->d_inode;
struct buffer_head * bh = NULL;
char * link;
int i;
......
......@@ -783,9 +783,10 @@ void fat_write_inode(struct inode *inode)
}
int fat_notify_change(struct inode * inode,struct iattr * attr)
int fat_notify_change(struct dentry * dentry, struct iattr * attr)
{
struct super_block *sb = inode->i_sb;
struct super_block *sb = dentry->d_sb;
struct inode *inode = dentry->d_inode;
int error;
error = inode_change_ok(inode, attr);
......
......@@ -18,8 +18,8 @@
#include <asm/uaccess.h>
static int isofs_readlink(struct inode *, char *, int);
static struct dentry * isofs_follow_link(struct inode * inode, struct dentry *base);
static int isofs_readlink(struct dentry *, char *, int);
static struct dentry * isofs_follow_link(struct dentry *, struct dentry *);
/*
* symlinks can't do much...
......@@ -44,14 +44,14 @@ struct inode_operations isofs_symlink_inode_operations = {
NULL /* permission */
};
static int isofs_readlink(struct inode * inode, char * buffer, int buflen)
static int isofs_readlink(struct dentry * dentry, char * buffer, int buflen)
{
char * pnt;
int i;
if (buflen > 1023)
buflen = 1023;
pnt = get_rock_ridge_symlink(inode);
pnt = get_rock_ridge_symlink(dentry->d_inode);
if (!pnt)
return 0;
......@@ -65,12 +65,12 @@ static int isofs_readlink(struct inode * inode, char * buffer, int buflen)
return i;
}
static struct dentry * isofs_follow_link(struct inode * inode, struct dentry *base)
static struct dentry * isofs_follow_link(struct dentry * dentry,
struct dentry *base)
{
char * pnt;
pnt = get_rock_ridge_symlink(inode);
pnt = get_rock_ridge_symlink(dentry->d_inode);
if(!pnt) {
dput(base);
return ERR_PTR(-ELOOP);
......
......@@ -42,7 +42,7 @@ nlmclnt_setlockargs(struct nlm_rqst *req, struct file_lock *fl)
memset(argp, 0, sizeof(*argp));
argp->cookie = nlm_cookie++;
argp->state = nsm_local_state;
lock->fh = *NFS_FH(fl->fl_file->f_dentry->d_inode);
lock->fh = *NFS_FH(fl->fl_file->f_dentry);
lock->caller = system_utsname.nodename;
lock->oh.data = req->a_owner;
lock->oh.len = sprintf(req->a_owner, "%d@%s",
......
......@@ -14,8 +14,8 @@
#include <asm/uaccess.h>
static int minix_readlink(struct inode *, char *, int);
static struct dentry *minix_follow_link(struct inode *, struct dentry *);
static int minix_readlink(struct dentry *, char *, int);
static struct dentry *minix_follow_link(struct dentry *, struct dentry *);
/*
* symlinks can't do much...
......@@ -40,8 +40,10 @@ struct inode_operations minix_symlink_inode_operations = {
NULL /* permission */
};
static struct dentry * minix_follow_link(struct inode * inode, struct dentry * base)
static struct dentry * minix_follow_link(struct dentry * dentry,
struct dentry * base)
{
struct inode *inode = dentry->d_inode;
struct buffer_head * bh;
bh = minix_bread(inode, 0, 0);
......@@ -55,7 +57,7 @@ static struct dentry * minix_follow_link(struct inode * inode, struct dentry * b
return base;
}
static int minix_readlink(struct inode * inode, char * buffer, int buflen)
static int minix_readlink(struct dentry * dentry, char * buffer, int buflen)
{
struct buffer_head * bh;
int i;
......@@ -63,7 +65,7 @@ static int minix_readlink(struct inode * inode, char * buffer, int buflen)
if (buflen > 1023)
buflen = 1023;
bh = minix_bread(inode, 0, 0);
bh = minix_bread(dentry->d_inode, 0, 0);
if (!bh)
return 0;
i = 0;
......
......@@ -221,33 +221,28 @@ void put_write_access(struct inode * inode)
}
/*
* This is called when everything else fails, and we actually have
* to go to the low-level filesystem to find out what we should do..
*
* We get the directory semaphore, and after getting that we also
* make sure that nobody added the entry to the dcache in the meantime..
* "." and ".." are special - ".." especially so because it has to be able
* to know about the current root directory and parent relationships
*/
static struct dentry * real_lookup(struct dentry * parent, struct qstr * name)
static struct dentry * reserved_lookup(struct dentry * parent, struct qstr * name)
{
struct dentry * result;
struct inode *dir = parent->d_inode;
struct dentry *result = NULL;
if (name->name[0] == '.') {
switch (name->len) {
default:
break;
case 2:
if (name->name[1] != '.')
break;
down(&dir->i_sem);
result = d_lookup(parent, name);
if (!result) {
struct dentry * dentry = d_alloc(parent, name);
result = ERR_PTR(-ENOMEM);
if (dentry) {
int error = dir->i_op->lookup(dir, dentry);
result = dentry;
if (error) {
dput(dentry);
result = ERR_PTR(error);
}
if (parent != current->fs->root)
parent = parent->d_covers->d_parent;
/* fallthrough */
case 1:
result = parent;
}
}
up(&dir->i_sem);
return result;
return dget(result);
}
/*
......@@ -274,28 +269,40 @@ static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name)
}
/*
* "." and ".." are special - ".." especially so because it has to be able
* to know about the current root directory and parent relationships
* This is called when everything else fails, and we actually have
* to go to the low-level filesystem to find out what we should do..
*
* We get the directory semaphore, and after getting that we also
* make sure that nobody added the entry to the dcache in the meantime..
*/
static struct dentry * reserved_lookup(struct dentry * parent, struct qstr * name)
static struct dentry * real_lookup(struct dentry * parent, struct qstr * name)
{
struct dentry *result = NULL;
if (name->name[0] == '.') {
switch (name->len) {
default:
break;
case 2:
if (name->name[1] != '.')
break;
struct dentry * result;
struct inode *dir = parent->d_inode;
if (parent != current->fs->root)
parent = parent->d_covers->d_parent;
/* fallthrough */
case 1:
result = parent;
down(&dir->i_sem);
/*
* First re-do the cached lookup just in case it was created
* while we waited for the directory semaphore..
*
* FIXME! This could use version numbering or similar to
* avoid unnecessary cache lookups.
*/
result = cached_lookup(parent, name);
if (!result) {
struct dentry * dentry = d_alloc(parent, name);
result = ERR_PTR(-ENOMEM);
if (dentry) {
int error = dir->i_op->lookup(dir, dentry);
result = dentry;
if (error) {
dput(dentry);
result = ERR_PTR(error);
}
}
}
return dget(result);
up(&dir->i_sem);
return result;
}
static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry)
......@@ -308,7 +315,7 @@ static struct dentry * do_follow_link(struct dentry *base, struct dentry *dentry
current->link_count++;
/* This eats the base */
result = inode->i_op->follow_link(inode, base);
result = inode->i_op->follow_link(dentry, base);
current->link_count--;
dput(dentry);
return result;
......@@ -632,7 +639,7 @@ struct dentry * open_namei(const char * pathname, int flag, int mode)
if (inode->i_sb && inode->i_sb->dq_op)
inode->i_sb->dq_op->initialize(inode, -1);
error = do_truncate(inode, 0);
error = do_truncate(dentry, 0);
}
put_write_access(inode);
if (error)
......@@ -1076,7 +1083,7 @@ static inline int do_link(const char * oldname, const char * newname)
if (dir->d_inode->i_sb && dir->d_inode->i_sb->dq_op)
dir->d_inode->i_sb->dq_op->initialize(dir->d_inode, -1);
error = dir->d_inode->i_op->link(inode, dir->d_inode, new_dentry);
error = dir->d_inode->i_op->link(old_dentry, dir->d_inode, new_dentry);
exit_lock:
unlock_dir(dir);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment