patch-2.3.43 linux/fs/sysv/file.c
Next file: linux/fs/sysv/fsync.c
Previous file: linux/fs/sysv/dir.c
Back to the patch index
Back to the overall index
- Lines: 66
- Date:
Thu Feb 10 12:16:59 2000
- Orig file:
v2.3.42/linux/fs/sysv/file.c
- Orig date:
Fri Jan 7 19:13:22 2000
diff -u --recursive --new-file v2.3.42/linux/fs/sysv/file.c linux/fs/sysv/file.c
@@ -23,59 +23,18 @@
#include <linux/locks.h>
#include <linux/pagemap.h>
-#include <asm/uaccess.h>
-
-#define NBUF 32
-
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#define MAX(a,b) (((a)>(b))?(a):(b))
-
-/*
- * Write to a file (through the page cache).
- */
-static ssize_t
-sysv_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
-{
- return generic_file_write(file, buf, count,
- ppos, block_write_partial_page);
-}
-
/*
* We have mostly NULLs here: the current defaults are OK for
* the coh filesystem.
*/
static struct file_operations sysv_file_operations = {
- NULL, /* lseek - default */
- generic_file_read, /* read */
- sysv_file_write, /* write */
- NULL, /* readdir - bad */
- NULL, /* poll - default */
- NULL, /* ioctl - default */
- generic_file_mmap, /* mmap */
- NULL, /* no special open is needed */
- NULL, /* flush */
- NULL, /* release */
- sysv_sync_file, /* fsync */
- NULL, /* fasync */
+ read: generic_file_read,
+ write: generic_file_write,
+ mmap: generic_file_mmap,
+ fsync: sysv_sync_file,
};
struct inode_operations sysv_file_inode_operations = {
- &sysv_file_operations, /* default file operations */
- NULL, /* create */
- NULL, /* lookup */
- NULL, /* link */
- NULL, /* unlink */
- NULL, /* symlink */
- NULL, /* mkdir */
- NULL, /* rmdir */
- NULL, /* mknod */
- NULL, /* rename */
- NULL, /* readlink */
- NULL, /* follow_link */
- sysv_get_block, /* get_block */
- block_read_full_page, /* readpage */
- block_write_full_page, /* writepage */
- sysv_truncate, /* truncate */
- NULL, /* permission */
- NULL /* revalidate */
+ &sysv_file_operations,
+ truncate: sysv_truncate,
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)