diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
commit | 116674acc97ba75a720329996877077d988443a2 (patch) | |
tree | 6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /fs/coda | |
parent | 71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff) |
Merge with Linux 2.4.2.
Diffstat (limited to 'fs/coda')
-rw-r--r-- | fs/coda/cnode.c | 7 | ||||
-rw-r--r-- | fs/coda/psdev.c | 2 | ||||
-rw-r--r-- | fs/coda/sysctl.c | 2 | ||||
-rw-r--r-- | fs/coda/upcall.c | 8 |
4 files changed, 12 insertions, 7 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 12de14e7b..53208881d 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c @@ -194,9 +194,14 @@ struct inode *coda_fid_to_inode(ViceFid *fid, struct super_block *sb) return NULL; } - /* check if this inode is linked to a cnode */ cii = ITOC(inode); + /* The inode might already be purged due to memory pressure */ + if ( coda_fideq(&cii->c_fid, &NullFID) ) { + iput(inode); + return NULL; + } + /* we shouldn't have inode collisions anymore */ if ( !coda_fideq(fid, &cii->c_fid) ) BUG(); diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index ef05ac2fb..ed88f70cd 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -23,7 +23,7 @@ #include <linux/major.h> #include <linux/sched.h> #include <linux/lp.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/ioport.h> #include <linux/fcntl.h> #include <linux/delay.h> diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 4215c3b41..4bde88515 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -17,7 +17,7 @@ #include <linux/sysctl.h> #include <linux/swapctl.h> #include <linux/proc_fs.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/stat.h> #include <linux/ctype.h> #include <asm/bitops.h> diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 6eb6f2e71..2fee47e4c 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -519,7 +519,7 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid, /* build packet for Venus */ if (data->vi.in_size > VC_MAXDATASIZE) { - error = EINVAL; + error = -EINVAL; goto exit; } @@ -539,7 +539,7 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid, /* get the data out of user space */ if ( copy_from_user((char*)inp + (long)inp->coda_ioctl.data, data->vi.in, data->vi.in_size) ) { - error = EINVAL; + error = -EINVAL; goto exit; } @@ -557,7 +557,7 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid, CDEBUG(D_FILE, "return len %d <= request len %d\n", outp->coda_ioctl.len, data->vi.out_size); - error = EINVAL; + error = -EINVAL; } else { error = verify_area(VERIFY_WRITE, data->vi.out, data->vi.out_size); @@ -566,7 +566,7 @@ int venus_pioctl(struct super_block *sb, struct ViceFid *fid, if (copy_to_user(data->vi.out, (char *)outp + (long)outp->coda_ioctl.data, data->vi.out_size)) { - error = EINVAL; + error = -EINVAL; goto exit; } } |