Commit b34c35ce authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.9pre1

parent afbf60cd
VERSION = 2
PATCHLEVEL = 3
SUBLEVEL = 8
SUBLEVEL = 9
EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
......
......@@ -142,9 +142,10 @@ static struct inode_operations proc_mca_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -1459,11 +1459,14 @@ static struct inode_operations proc_mtrr_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct proc_dir_entry proc_root_mtrr = {
......
......@@ -74,11 +74,14 @@ struct inode_operations proc_ppc_htab_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
/* these will go into processor.h when I'm done debugging -- Cort */
......
......@@ -55,8 +55,15 @@ static void set_brk(unsigned long start, unsigned long end)
* These are the only things you should do on a core-file: use only these
* macros to write out all the necessary info.
*/
#define DUMP_WRITE(addr,nr) \
while (file->f_op->write(file,(char *)(addr),(nr),&file->f_pos) != (nr)) goto close_coredump
static int dump_write(struct file *file, const void *addr, int nr)
{
return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
}
#define DUMP_WRITE(addr, nr) \
if (!dump_write(file, (void *)(addr), (nr))) \
goto close_coredump;
#define DUMP_SEEK(offset) \
if (file->f_op->llseek) { \
......
......@@ -855,17 +855,15 @@ asmlinkage long sys32_readv(int fd, struct iovec32 *vector, u32 count)
long ret = -EBADF;
lock_kernel();
file = fget(fd);
if(!file)
goto bad_file;
if(!(file->f_mode & 1))
goto out;
ret = do_readv_writev32(VERIFY_WRITE, file,
vector, count);
out:
if (file->f_op && file->f_op->read && (file->f_mode & FMODE_READ))
ret = do_readv_writev32(VERIFY_WRITE, file, vector, count);
fput(file);
bad_file:
unlock_kernel();
return ret;
......@@ -877,19 +875,14 @@ asmlinkage long sys32_writev(int fd, struct iovec32 *vector, u32 count)
int ret = -EBADF;
lock_kernel();
file = fget(fd);
if(!file)
goto bad_file;
if(!(file->f_mode & 2))
goto out;
down(&file->f_dentry->d_inode->i_sem);
ret = do_readv_writev32(VERIFY_READ, file,
vector, count);
up(&file->f_dentry->d_inode->i_sem);
out:
if (file->f_op && file->f_op->write && (file->f_mode & FMODE_WRITE))
ret = do_readv_writev32(VERIFY_READ, file, vector, count);
fput(file);
bad_file:
unlock_kernel();
return ret;
......
......@@ -318,9 +318,12 @@ struct inode_operations proc_ringbuf_inode_operations = {
NULL, /* mknod */
NULL, /* rename */
NULL, /* readlink */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -322,8 +322,6 @@ void add_request(struct blk_dev_struct * dev, struct request * req)
spin_lock_irqsave(&io_request_lock,flags);
current_request = get_queue(req->rq_dev);
if (req->bh)
mark_buffer_clean(req->bh);
if (!(tmp = *current_request)) {
*current_request = req;
if (dev->current_request != &dev->plug)
......@@ -425,9 +423,13 @@ void make_request(int major,int rw, struct buffer_head * bh)
rw_ahead = 1;
rw = WRITE; /* drop into WRITE */
case WRITE:
if (!buffer_dirty(bh)) /* Hmmph! Nothing to write */
goto end_io;
/* We don't allow the write-requests to fill up the
if (!test_and_clear_bit(BH_Dirty, &bh->b_state))
goto end_io; /* Hmmph! Nothing to write */
lock_kernel();
refile_buffer(bh);
unlock_kernel();
/*
* We don't allow the write-requests to fill up the
* queue completely: we want some room for reads,
* as they take precedence. The last third of the
* requests are only for reads.
......@@ -528,7 +530,6 @@ void make_request(int major,int rw, struct buffer_head * bh)
} else
continue;
mark_buffer_clean(bh);
spin_unlock_irqrestore(&io_request_lock,flags);
return;
......
......@@ -112,11 +112,14 @@ static struct inode_operations ftape_proc_inode_operations =
NULL, /* mknod */
NULL, /* rename */
NULL, /* readlink */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL, /* revalidate */
};
/*
......
......@@ -103,7 +103,8 @@
#define RS_STROBE_TIME (10*HZ)
#define RS_ISR_PASS_LIMIT 256
#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
#define IRQ_T(state) \
((state->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
#define SERIAL_INLINE
......@@ -1003,7 +1004,7 @@ static int startup(struct async_struct * info)
} else
handler = rs_interrupt_single;
retval = request_irq(state->irq, handler, IRQ_T(info),
retval = request_irq(state->irq, handler, IRQ_T(state),
"serial", NULL);
if (retval) {
if (capable(CAP_SYS_ADMIN)) {
......@@ -1168,7 +1169,7 @@ static void shutdown(struct async_struct * info)
if (IRQ_ports[state->irq]) {
free_irq(state->irq, NULL);
retval = request_irq(state->irq, rs_interrupt_single,
IRQ_T(info), "serial", NULL);
IRQ_T(state), "serial", NULL);
if (retval)
printk("serial shutdown: request_irq: error %d"
......@@ -2017,7 +2018,7 @@ static int set_multiport_struct(struct async_struct * info,
else
handler = rs_interrupt;
retval = request_irq(state->irq, handler, IRQ_T(info),
retval = request_irq(state->irq, handler, IRQ_T(state),
"serial", NULL);
if (retval) {
printk("Couldn't reallocate serial interrupt "
......
......@@ -222,11 +222,14 @@ static struct inode_operations proc_bus_pci_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
int
......
......@@ -89,11 +89,14 @@ static struct inode_operations proc_bus_zorro_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
int
......
......@@ -51,12 +51,14 @@ struct inode_operations adfs_dir_inode_operations = {
NULL, /* rename */
NULL, /* read link */
NULL, /* follow link */
NULL, /* bmap */
NULL, /* read page */
NULL, /* write page */
NULL, /* bmap */
NULL, /* flush page */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
unsigned int adfs_val (unsigned char *p, int len)
......
......@@ -61,10 +61,12 @@ struct inode_operations adfs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
adfs_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -57,9 +57,10 @@ struct inode_operations affs_dir_inode_operations = {
affs_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permissions */
NULL, /* smap */
......
......@@ -74,9 +74,10 @@ struct inode_operations affs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
affs_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
affs_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -114,9 +115,10 @@ struct inode_operations affs_file_inode_operations_ofs = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
affs_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -35,12 +35,14 @@ struct inode_operations affs_symlink_inode_operations = {
NULL, /* rename */
affs_readlink, /* readlink */
affs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
static int
......
......@@ -73,9 +73,10 @@ struct inode_operations autofs_dir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -54,9 +54,10 @@ struct inode_operations autofs_root_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -49,9 +49,10 @@ struct inode_operations autofs_symlink_inode_operations = {
NULL, /* rename */
autofs_readlink, /* readlink */
autofs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -1539,9 +1539,11 @@ int block_write_partial_page (struct file *file, struct page *page, unsigned lon
* lots of dirty pages.
*/
if (!test_and_set_bit(BH_Dirty, &bh->b_state)) {
__atomic_mark_buffer_dirty(bh, bdf_prm.b_un.age_buffer);
lock_kernel();
__mark_dirty(bh, 0);
if (too_many_dirty_buffers)
balance_dirty(bh->b_dev);
unlock_kernel();
}
skip:
......
......@@ -77,9 +77,10 @@ struct inode_operations coda_dir_inode_operations =
coda_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
coda_permission, /* permission */
NULL, /* smap */
......
......@@ -47,13 +47,13 @@ struct inode_operations coda_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
coda_readpage, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
coda_permission, /* permission */
NULL, /* smap */
NULL, /* update page */
coda_revalidate_inode /* revalidate */
};
......@@ -101,7 +101,7 @@ static int coda_readpage(struct file * coda_file, struct page * page)
CDEBUG(D_INODE, "coda ino: %ld, cached ino %ld, page offset: %lx\n",
coda_inode->i_ino, cii->c_ovp->i_ino, page->offset);
generic_readpage(&cont_file, page);
block_read_full_page(&cont_file, page);
EXIT;
return 0;
}
......
......@@ -46,13 +46,13 @@ struct inode_operations coda_ioctl_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
coda_ioctl_permission, /* permission */
NULL, /* smap */
NULL, /* update page */
NULL /* revalidate */
};
......
......@@ -42,13 +42,13 @@ struct inode_operations coda_symlink_inode_operations = {
NULL, /* rename */
coda_readlink, /* readlink */
coda_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL, /* update page */
NULL /* revalidate */
};
......
......@@ -333,11 +333,14 @@ struct inode_operations chrdev_inode_operations = {
NULL, /* mknod */
NULL, /* rename */
NULL, /* readlink */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
/*
......
......@@ -51,9 +51,10 @@ struct inode_operations devpts_root_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -38,12 +38,14 @@ struct inode_operations efs_dir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
efs_bmap, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
efs_bmap, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) {
......
......@@ -38,12 +38,14 @@ struct inode_operations efs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
efs_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
int efs_bmap(struct inode *inode, efs_block_t block) {
......
......@@ -26,12 +26,14 @@ struct inode_operations efs_symlink_inode_operations = {
NULL, /* rename */
efs_readlink, /* readlink */
efs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
static char *efs_linktarget(struct inode *in, int *len) {
......
......@@ -57,12 +57,14 @@ struct inode_operations fat_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
fat_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
fat_truncate, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
/* #Specification: msdos / special devices / mmap
......@@ -107,12 +109,14 @@ struct inode_operations fat_file_inode_operations_1024 = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
fat_truncate, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
static struct file_operations fat_file_operations_readpage = {
......@@ -142,12 +146,14 @@ struct inode_operations fat_file_inode_operations_readpage = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
fat_readpage, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
fat_truncate, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
#define MSDOS_PREFETCH 32
......
......@@ -87,12 +87,14 @@ struct inode_operations hfs_cap_ndir_inode_operations = {
hfs_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
struct inode_operations hfs_cap_fdir_inode_operations = {
......@@ -108,12 +110,14 @@ struct inode_operations hfs_cap_fdir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
struct inode_operations hfs_cap_rdir_inode_operations = {
......@@ -129,12 +133,14 @@ struct inode_operations hfs_cap_rdir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
/*================ File-local functions ================*/
......
......@@ -86,12 +86,14 @@ struct inode_operations hfs_dbl_dir_inode_operations = {
dbl_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
......
......@@ -93,9 +93,10 @@ struct inode_operations hfs_nat_ndir_inode_operations = {
hfs_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -115,9 +116,10 @@ struct inode_operations hfs_nat_hdir_inode_operations = {
nat_hdr_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -63,9 +63,10 @@ struct inode_operations hfs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
hfs_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
hfs_file_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -77,9 +77,10 @@ struct inode_operations hfs_cap_info_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap - none */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap - none */
NULL, /* flushpage */
cap_info_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -78,10 +78,11 @@ struct inode_operations hfs_hdr_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap - XXX: not available since
header part has no disk block */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
hdr_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -41,10 +41,11 @@ static const struct inode_operations hpfs_file_iops =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
(int (*)(struct inode *, int))
&hpfs_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
&hpfs_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -84,9 +85,10 @@ static const struct inode_operations hpfs_dir_iops =
hpfs_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -107,9 +109,10 @@ const struct inode_operations hpfs_symlink_iops =
NULL, /* rename */
hpfs_readlink, /* readlink */
hpfs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -57,11 +57,14 @@ struct inode_operations isofs_dir_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static int isofs_name_translate(char * old, int len, char * new)
......
......@@ -53,5 +53,7 @@ struct inode_operations isofs_file_inode_operations = {
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -38,11 +38,14 @@ struct inode_operations isofs_symlink_inode_operations = {
NULL, /* rename */
isofs_readlink, /* readlink */
isofs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static int isofs_readlink(struct dentry * dentry, char * buffer, int buflen)
......
......@@ -52,11 +52,14 @@ struct inode_operations minix_dir_inode_operations = {
minix_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static int minix_readdir(struct file * filp,
......
......@@ -29,39 +29,12 @@
static int minix_writepage(struct file *file, struct page *page)
{
struct dentry *dentry = file->f_dentry;
struct inode *inode = dentry->d_inode;
unsigned long block;
int *p, nr[PAGE_SIZE/BLOCK_SIZE];
int i, err, created;
struct buffer_head *bh;
i = PAGE_SIZE / BLOCK_SIZE;
block = page->offset / BLOCK_SIZE;
p = nr;
bh = page->buffers;
do {
if (bh && bh->b_blocknr)
*p = bh->b_blocknr;
else
*p = minix_getblk_block(inode, block, 1, &err, &created);
if (!*p)
return -EIO;
i--;
block++;
p++;
if (bh)
bh = bh->b_this_page;
} while(i > 0);
/* IO start */
brw_page(WRITE, page, inode->i_dev, nr, BLOCK_SIZE, 1);
return 0;
return block_write_full_page(file, page, minix_getblk_block);
}
static long minix_write_one_page(struct file *file, struct page *page, unsigned long offset, unsigned long bytes, const char *buf)
{
return block_write_one_page(file, page, offset, bytes, buf, minix_getblk_block);
return block_write_partial_page(file, page, offset, bytes, buf, minix_getblk_block);
}
/*
......@@ -88,7 +61,10 @@ static struct file_operations minix_file_operations = {
NULL, /* no special open is needed */
NULL, /* flush */
NULL, /* release */
minix_sync_file /* fsync */
minix_sync_file, /* fsync */
NULL, /* fasync */
NULL, /* check_media_change */
NULL /* revalidate */
};
struct inode_operations minix_file_inode_operations = {
......@@ -104,12 +80,12 @@ struct inode_operations minix_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
minix_writepage, /* writepage */
minix_bmap, /* bmap */
block_read_full_page, /* readpage */
minix_writepage, /* writepage */
block_flushpage, /* flushpage */
minix_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL, /* revalidate */
block_flushpage, /* flushpage */
};
......@@ -33,11 +33,14 @@ struct inode_operations minix_symlink_inode_operations = {
NULL, /* rename */
minix_readlink, /* readlink */
minix_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct dentry * minix_follow_link(struct dentry * dentry,
......
......@@ -627,9 +627,10 @@ struct inode_operations msdos_dir_inode_operations = {
msdos_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -92,9 +92,10 @@ struct inode_operations ncp_dir_inode_operations =
ncp_rename, /* rename */
NULL, /* readlink */
NULL, /* follow link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -295,6 +295,13 @@ struct inode_operations ncp_file_inode_operations =
NULL, /* mknod */
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL /* truncate */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -59,12 +59,14 @@ struct inode_operations ncp_symlink_inode_operations={
NULL, /* rename */
ncp_readlink, /* readlink */
ncp_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
/* ----- follow a symbolic link ------------------------------------------ */
......
......@@ -439,9 +439,10 @@ static struct inode_operations ntfs_inode_operations_nobmap = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -621,9 +622,10 @@ static struct inode_operations ntfs_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage,
NULL, /* writepage */
ntfs_bmap,
block_read_full_page,
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......@@ -669,9 +671,10 @@ static struct inode_operations ntfs_dir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -577,11 +577,14 @@ static struct inode_operations openpromfs_prop_inode_ops = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct file_operations openpromfs_nodenum_ops = {
......@@ -611,11 +614,14 @@ static struct inode_operations openpromfs_nodenum_inode_ops = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct file_operations openprom_alias_operations = {
......@@ -645,11 +651,14 @@ static struct inode_operations openprom_alias_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static int lookup_children(u16 n, const char * name, int len)
......
......@@ -114,10 +114,12 @@ struct inode_operations qnx4_dir_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -189,16 +189,18 @@ struct inode_operations qnx4_file_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
qnx4_bmap, /* bmap */
qnx4_readpage, /* readpage */
NULL, /* writepage */
qnx4_bmap, /* bmap */
NULL, /* flushpage */
#ifdef CONFIG_QNX4FS_RW
qnx4_truncate, /* truncate */
#else
NULL,
#endif
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
static int qnx4_readpage(struct file *file, struct page *page)
......
......@@ -43,11 +43,14 @@ struct inode_operations qnx4_symlink_inode_operations =
NULL, /* rename */
qnx4_readlink, /* readlink */
qnx4_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct dentry *qnx4_follow_link(struct dentry *dentry,
......
/*
* ROMFS file system, Linux implementation
*
* Copyright (C) 1997 Janos Farkas <chexum@shadow.banki.hu>
* Copyright (C) 1997-1999 Janos Farkas <chexum@shadow.banki.hu>
*
* Using parts of the minix filesystem
* Copyright (C) 1991, 1992 Linus Torvalds
......@@ -57,6 +57,7 @@
#include <linux/fs.h>
#include <linux/locks.h>
#include <linux/init.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
......@@ -320,7 +321,7 @@ romfs_lookup(struct inode *dir, struct dentry *dentry)
const char *name; /* got from dentry */
int len;
res = 0; /* instead of ENOENT */
res = -EACCES; /* placeholder for "no data here" */
offset = dir->i_ino & ROMFH_MASK;
if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
goto out;
......@@ -335,8 +336,9 @@ romfs_lookup(struct inode *dir, struct dentry *dentry)
len = dentry->d_name.len;
for(;;) {
if (!offset || offset >= maxoff
|| romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
if (!offset || offset >= maxoff)
goto out0;
if (romfs_copyfrom(dir, &ri, offset, ROMFH_SIZE) <= 0)
goto out;
/* try to match the first 16 bytes of name */
......@@ -365,19 +367,28 @@ romfs_lookup(struct inode *dir, struct dentry *dentry)
if ((ntohl(ri.next) & ROMFH_TYPE) == ROMFH_HRD)
offset = ntohl(ri.spec) & ROMFH_MASK;
if ((inode = iget(dir->i_sb, offset))==NULL) {
res = -EACCES;
} else {
d_add(dentry, inode);
}
if ((inode = iget(dir->i_sb, offset)))
goto outi;
out:
return ERR_PTR(res);
/*
* it's a bit funky, _lookup needs to return an error code
* (negative) or a NULL, both as a dentry. ENOENT should not
* be returned, instead we need to create a negative dentry by
* d_add(dentry, NULL); and return 0 as no error.
* (Although as I see, it only matters on writable file
* systems).
*/
out0: inode = NULL;
outi: res = 0;
d_add (dentry, inode);
out: return ERR_PTR(res);
}
/*
* Ok, we do readpage, to be able to execute programs. Unfortunately,
* we can't use bmap, since we have looser alignments.
* we can't use bmap, since we may have looser alignments.
*/
static int
......@@ -389,12 +400,13 @@ romfs_readpage(struct file * file, struct page * page)
unsigned long offset, avail, readlen;
int result = -EIO;
atomic_inc(&page->count);
set_bit(PG_locked, &page->flags);
lock_kernel();
get_page(page);
buf = page_address(page);
clear_bit(PG_uptodate, &page->flags);
clear_bit(PG_error, &page->flags);
/* hack? */
page->owner = (int)current;
offset = page->offset;
if (offset < inode->i_size) {
avail = inode->i_size-offset;
......@@ -403,18 +415,19 @@ romfs_readpage(struct file * file, struct page * page)
if (readlen < PAGE_SIZE) {
memset((void *)(buf+readlen),0,PAGE_SIZE-readlen);
}
set_bit(PG_uptodate, &page->flags);
SetPageUptodate(page);
result = 0;
}
}
if (result) {
set_bit(PG_error, &page->flags);
memset((void *)buf, 0, PAGE_SIZE);
SetPageError(page);
}
clear_bit(PG_locked, &page->flags);
wake_up(&page->wait);
UnlockPage(page);
free_page(buf);
unlock_kernel();
return result;
}
......@@ -508,12 +521,14 @@ static struct inode_operations romfs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap -- not really */
romfs_readpage, /* readpage */
NULL, /* writepage */
NULL, /* bmap -- not really */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct file_operations romfs_dir_operations = {
......@@ -550,12 +565,14 @@ static struct inode_operations romfs_dir_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct inode_operations romfs_link_inode_operations = {
......@@ -571,18 +588,20 @@ static struct inode_operations romfs_link_inode_operations = {
NULL, /* rename */
romfs_readlink, /* readlink */
romfs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static mode_t romfs_modemap[] =
{
0, S_IFDIR, S_IFREG, S_IFLNK+0777,
S_IFBLK, S_IFCHR, S_IFSOCK, S_IFIFO
0, S_IFDIR+0644, S_IFREG+0644, S_IFLNK+0777,
S_IFBLK+0600, S_IFCHR+0600, S_IFSOCK+0644, S_IFIFO+0644
};
static struct inode_operations *romfs_inoops[] =
......@@ -591,10 +610,10 @@ static struct inode_operations *romfs_inoops[] =
&romfs_dir_inode_operations,
&romfs_file_inode_operations,
&romfs_link_inode_operations,
&blkdev_inode_operations, /* standard handlers */
&chrdev_inode_operations,
NULL, /* socket */
NULL, /* fifo */
NULL, /* device/fifo/socket nodes, */
NULL, /* set by init_special_inode */
NULL,
NULL,
};
static void
......@@ -627,34 +646,30 @@ romfs_read_inode(struct inode *i)
i->i_mtime = i->i_atime = i->i_ctime = 0;
i->i_uid = i->i_gid = 0;
i->i_op = romfs_inoops[nextfh & ROMFH_TYPE];
/* Precalculate the data offset */
ino = romfs_strnlen(i, ino+ROMFH_SIZE, ROMFS_MAXFN);
if (ino >= 0)
ino = ((ROMFH_SIZE+ino+1+ROMFH_PAD)&ROMFH_MASK);
else
ino = 0;
i->u.romfs_i.i_metasize = ino;
i->u.romfs_i.i_dataoffset = ino+(i->i_ino&ROMFH_MASK);
/* Compute permissions */
ino = S_IRUGO|S_IWUSR;
ino |= romfs_modemap[nextfh & ROMFH_TYPE];
if (nextfh & ROMFH_EXEC) {
ino |= S_IXUGO;
}
i->i_mode = ino;
if (S_ISFIFO(ino))
init_fifo(i);
else if (S_ISDIR(ino))
i->i_size = i->u.romfs_i.i_metasize;
else if (S_ISBLK(ino) || S_ISCHR(ino)) {
i->i_mode &= ~(S_IRWXG|S_IRWXO);
ino = ntohl(ri.spec);
i->i_rdev = MKDEV(ino>>16,ino&0xffff);
/* Precalculate the data offset */
ino = romfs_strnlen(i, ino+ROMFH_SIZE, ROMFS_MAXFN);
if (ino >= 0)
ino = ((ROMFH_SIZE+ino+1+ROMFH_PAD)&ROMFH_MASK);
else
ino = 0;
i->u.romfs_i.i_metasize = ino;
i->u.romfs_i.i_dataoffset = ino+(i->i_ino&ROMFH_MASK);
/* Compute permissions */
ino = romfs_modemap[nextfh & ROMFH_TYPE];
/* only "normal" files have ops */
if ((i->i_op = romfs_inoops[nextfh & ROMFH_TYPE])) {
if (nextfh & ROMFH_EXEC)
ino |= S_IXUGO;
i->i_mode = ino;
if (S_ISDIR(ino))
i->i_size = i->u.romfs_i.i_metasize;
} else {
/* depending on MBZ for sock/fifos */
nextfh = ntohl(ri.spec);
nextfh = kdev_t_to_nr(MKDEV(nextfh>>16,nextfh&0xffff));
init_special_inode(i, ino, nextfh);
}
}
......
......@@ -59,9 +59,10 @@ struct inode_operations smb_dir_inode_operations =
smb_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -404,9 +404,10 @@ struct inode_operations smb_file_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
smb_readpage, /* readpage */
smb_writepage, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
smb_file_permission, /* permission */
NULL, /* smap */
......
......@@ -59,11 +59,14 @@ struct inode_operations sysv_dir_inode_operations = {
sysv_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static int sysv_readdir(struct file * filp, void * dirent, filldir_t filldir)
......
......@@ -35,39 +35,12 @@
static int sysv_writepage (struct file * file, struct page * page)
{
struct dentry *dentry = file->f_dentry;
struct inode *inode = dentry->d_inode;
unsigned long block;
int *p, nr[PAGE_SIZE/512];
int i, err, created;
struct buffer_head *bh;
i = PAGE_SIZE >> inode->i_sb->sv_block_size_bits;
block = page->offset >> inode->i_sb->sv_block_size_bits;
p = nr;
bh = page->buffers;
do {
if (bh && bh->b_blocknr)
*p = bh->b_blocknr;
else
*p = sysv_getblk_block (inode, block, 1, &err, &created);
if (!*p)
return -EIO;
i--;
block++;
p++;
if (bh)
bh = bh->b_this_page;
} while (i > 0);
/* IO start */
brw_page(WRITE, page, inode->i_dev, nr, inode->i_sb->sv_block_size, 1);
return 0;
return block_write_full_page(file, page, sysv_getblk_block);
}
static long sysv_write_one_page (struct file *file, struct page *page, unsigned long offset, unsigned long bytes, const char * buf)
{
return block_write_one_page(file, page, offset, bytes, buf, sysv_getblk_block);
return block_write_partial_page(file, page, offset, bytes, buf, sysv_getblk_block);
}
/*
......@@ -113,12 +86,12 @@ struct inode_operations sysv_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
sysv_writepage, /* writepage */
sysv_bmap, /* bmap */
block_read_full_page, /* readpage */
sysv_writepage, /* writepage */
block_flushpage, /* flushpage */
sysv_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL, /* revalidate */
block_flushpage, /* flushpage */
NULL /* revalidate */
};
......@@ -39,11 +39,14 @@ struct inode_operations sysv_symlink_inode_operations = {
NULL, /* rename */
sysv_readlink, /* readlink */
sysv_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
static struct dentry *sysv_follow_link(struct dentry * dentry,
......
......@@ -209,10 +209,12 @@ struct inode_operations ufs_dir_inode_operations = {
ufs_rename, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
ufs_permission, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -89,38 +89,12 @@ static inline void remove_suid(struct inode *inode)
static int ufs_writepage (struct file *file, struct page *page)
{
struct dentry *dentry = file->f_dentry;
struct inode *inode = dentry->d_inode;
unsigned long block;
int *p, nr[PAGE_SIZE/512];
int i, err, created;
struct buffer_head *bh;
i = PAGE_SIZE >> inode->i_sb->s_blocksize_bits;
block = page->offset >> inode->i_sb->s_blocksize_bits;
p = nr;
bh = page->buffers;
do {
if (bh && bh->b_blocknr)
*p = bh->b_blocknr;
else
*p = ufs_getfrag_block(inode, block, 1, &err, &created);
if (!*p)
return -EIO;
i--;
block++;
p++;
if (bh)
bh = bh->b_this_page;
} while (i > 0);
brw_page(WRITE, page, inode->i_dev, nr, inode->i_sb->s_blocksize, 1);
return 0;
return block_write_full_page(file, page, ufs_getfrag_block);
}
static long ufs_write_one_page(struct file *file, struct page *page, unsigned long offset, unsigned long bytes, const char *buf)
{
return block_write_one_page(file, page, offset, bytes, buf, ufs_getfrag_block);
return block_write_partial_page(file, page, offset, bytes, buf, ufs_getfrag_block);
}
/*
......@@ -129,7 +103,14 @@ static long ufs_write_one_page(struct file *file, struct page *page, unsigned lo
static ssize_t
ufs_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{
return generic_file_write(file, buf, count, ppos, ufs_write_one_page);
ssize_t retval = generic_file_write(file, buf, count, ppos, ufs_write_one_page);
if (retval > 0) {
struct inode *inode = file->f_dentry->d_inode;
remove_suid(inode);
inode->i_ctime = inode->i_mtime = CURRENT_TIME;
mark_inode_dirty(inode);
}
return retval;
}
/*
......@@ -176,12 +157,12 @@ struct inode_operations ufs_file_inode_operations = {
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
ufs_writepage, /* writepage */
ufs_bmap, /* bmap */
block_read_full_page, /* readpage */
ufs_writepage, /* writepage */
block_flushpage, /* flushpage */
ufs_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL, /* revalidate */
block_flushpage, /* flushpage */
};
......@@ -129,10 +129,12 @@ struct inode_operations ufs_symlink_inode_operations = {
NULL, /* rename */
ufs_readlink, /* readlink */
ufs_follow_link, /* follow_link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL /* smap */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -832,9 +832,10 @@ struct inode_operations umsdos_dir_inode_operations =
UMSDOS_rename, /* rename */
NULL, /* readlink */
NULL, /* followlink */
generic_readpage, /* readpage */
NULL, /* writepage */
fat_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -99,12 +99,14 @@ struct inode_operations umsdos_file_inode_operations =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow_link */
generic_readpage, /* readpage */
NULL, /* writepage */
fat_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
UMSDOS_truncate, /* truncate */
NULL, /* permission */
fat_smap /* smap */
fat_smap, /* smap */
NULL /* revalidate */
};
/* For other with larger and unaligned file system */
......@@ -137,12 +139,14 @@ struct inode_operations umsdos_file_inode_operations_no_bmap =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow link */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
UMSDOS_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
/* For other with larger and unaligned file system with readpage */
......@@ -175,10 +179,12 @@ struct inode_operations umsdos_file_inode_operations_readpage =
NULL, /* rename */
NULL, /* readlink */
NULL, /* follow link */
NULL, /* bmap */
fat_readpage, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
UMSDOS_truncate, /* truncate */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
......@@ -135,9 +135,10 @@ struct inode_operations umsdos_symlink_inode_operations =
NULL, /* rename */
UMSDOS_readlink, /* readlink */
UMSDOS_followlink, /* followlink */
generic_readpage, /* readpage */
NULL, /* writepage */
fat_bmap, /* bmap */
block_read_full_page, /* readpage */
NULL, /* writepage */
NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
NULL, /* smap */
......
......@@ -1232,11 +1232,14 @@ struct inode_operations vfat_dir_inode_operations = {
vfat_rename, /* rename */
NULL, /* readlink */
NULL, /* followlink */
NULL, /* bmap */
NULL, /* readpage */
NULL, /* writepage */
NULL, /* bmap */
NULL, /* flushpage */
NULL, /* truncate */
NULL /* permission */
NULL, /* permission */
NULL, /* smap */
NULL /* revalidate */
};
struct super_block *vfat_read_super(struct super_block *sb,void *data,
......
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