]> git.neil.brown.name Git - history.git/commitdiff
NTFS 2.0.7: minor cleanup, remove NULL struct initializers
authorAnton Altaparmakov <aia21@cantab.net>
Sat, 11 May 2002 13:08:27 +0000 (14:08 +0100)
committerAnton Altaparmakov <aia21@cantab.net>
Sat, 11 May 2002 13:08:27 +0000 (14:08 +0100)
fs/ntfs/ChangeLog
fs/ntfs/Makefile
fs/ntfs/attraops.c
fs/ntfs/file.c
fs/ntfs/mft.c
fs/ntfs/namei.c
fs/ntfs/super.c

index bd1e60d0d4ddaaf8ebc4cbcb0f4ab5325677f742..a9417af498aa29a072cc7e865428cdf4d6e89250 100644 (file)
@@ -24,6 +24,11 @@ ToDo:
        - Want to use dummy inodes for address space i/o. We need some VFS
          changes first, which are currently under discussion.
 
+2.0.7 - Minor cleanups and updates for changes in core kernel code.
+
+       - Remove much of the NULL struct element initializers.
+       - Various updates to make compatible with recent kernels.
+
 2.0.6 - Major bugfix to make compatible with other kernel changes.
 
        - Initialize the mftbmp address space properly now that there are more
index aebe60aaf54665dbd828222aa9035cc490180615..94feb47d3c3c7ce88eb24d8db3f11c46f317faf8 100644 (file)
@@ -7,7 +7,7 @@ obj-y   := aops.o attrib.o compress.o debug.o dir.o file.o inode.o mft.o \
 
 obj-m   := $(O_TARGET)
 
-EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.6\"
+EXTRA_CFLAGS = -DNTFS_VERSION=\"2.0.7\"
 
 ifeq ($(CONFIG_NTFS_DEBUG),y)
 EXTRA_CFLAGS += -DDEBUG
index f9a0fc82dd24e8a3c1622b86945161f3caf1828d..e75825a99c79069b7f1d83651ff55b578fa8d22f 100644 (file)
@@ -43,6 +43,5 @@ struct address_space_operations ntfs_attr_aops = {
                                                   disk request queue. */
        prepare_write:  NULL,                   /* . */
        commit_write:   NULL,                   /* . */
-       //truncatepage: NULL,                   /* . */
 };
 
index c0235fdc1dc01e41badcf68a2f7bbad1a7e61915..ed25512516223b9af677d2750c4984c464d8779a 100644 (file)
 struct file_operations ntfs_file_ops = {
        llseek:                 generic_file_llseek,    /* Seek inside file. */
        read:                   generic_file_read,      /* Read from file. */
-       write:                  NULL,                   /* . */
-       readdir:                NULL,                   /* . */
-       poll:                   NULL,                   /* . */
-       ioctl:                  NULL,                   /* . */
        mmap:                   generic_file_mmap,      /* Mmap file. */
        open:                   generic_file_open,      /* Open file. */
-       flush:                  NULL,                   /* . */
-       release:                NULL,                   /* . */
-       fsync:                  NULL,                   /* . */
-       fasync:                 NULL,                   /* . */
-       lock:                   NULL,                   /* . */
-       readv:                  NULL,                   /* . */
-       writev:                 NULL,                   /* . */
-       sendpage:               NULL,                   /* . */
-       get_unmapped_area:      NULL,                   /* . */
 };
 
-struct inode_operations ntfs_file_inode_ops = {
-       create:         NULL,           /* . */
-       lookup:         NULL,           /* . */
-       link:           NULL,           /* . */
-       unlink:         NULL,           /* . */
-       symlink:        NULL,           /* . */
-       mkdir:          NULL,           /* . */
-       rmdir:          NULL,           /* . */
-       mknod:          NULL,           /* . */
-       rename:         NULL,           /* . */
-       readlink:       NULL,           /* . */
-       follow_link:    NULL,           /* . */
-       truncate:       NULL,           /* . */
-       permission:     NULL,           /* . */
-       revalidate:     NULL,           /* . */
-       setattr:        NULL,           /* . */
-       getattr:        NULL,           /* . */
-};
-
-#if 0
-/* NOTE: read, write, poll, fsync, readv, writev can be called without the big
- * kernel lock held in all filesystems. */
-struct file_operations {
-       struct module *owner;
-       loff_t (*llseek) (struct file *, loff_t, int);
-       ssize_t (*read) (struct file *, char *, size_t, loff_t *);
-       ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
-       int (*readdir) (struct file *, void *, filldir_t);
-       unsigned int (*poll) (struct file *, struct poll_table_struct *);
-       int (*ioctl) (struct inode *, struct file *, unsigned int,
-                       unsigned long);
-       int (*mmap) (struct file *, struct vm_area_struct *);
-       int (*flush) (struct file *);
-       int (*release) (struct inode *, struct file *);
-       int (*fsync) (struct file *, struct dentry *, int datasync);
-       int (*fasync) (int, struct file *, int);
-       int (*lock) (struct file *, int, struct file_lock *);
-       ssize_t (*readv) (struct file *, const struct iovec *, unsigned long,
-                       loff_t *);
-       ssize_t (*writev) (struct file *, const struct iovec *, unsigned long,
-                       loff_t *);
-       ssize_t (*sendpage) (struct file *, struct page *, int, size_t,
-                       loff_t *, int);
-       unsigned long (*get_unmapped_area)(struct file *, unsigned long,
-                       unsigned long, unsigned long, unsigned long);
-};
+struct inode_operations ntfs_file_inode_ops = {};
 
-struct inode_operations {
-       int (*create) (struct inode *,struct dentry *,int);
-       struct dentry * (*lookup) (struct inode *,struct dentry *);
-       int (*link) (struct dentry *,struct inode *,struct dentry *);
-       int (*unlink) (struct inode *,struct dentry *);
-       int (*symlink) (struct inode *,struct dentry *,const char *);
-       int (*mkdir) (struct inode *,struct dentry *,int);
-       int (*rmdir) (struct inode *,struct dentry *);
-       int (*mknod) (struct inode *,struct dentry *,int,int);
-       int (*rename) (struct inode *, struct dentry *,
-                       struct inode *, struct dentry *);
-       int (*readlink) (struct dentry *, char *,int);
-       int (*follow_link) (struct dentry *, struct nameidata *);
-       void (*truncate) (struct inode *);
-       int (*permission) (struct inode *, int);
-       int (*revalidate) (struct dentry *);
-       int (*setattr) (struct dentry *, struct iattr *);
-       int (*getattr) (struct dentry *, struct iattr *);
-};
-#endif
+struct file_operations ntfs_empty_file_ops = {};
 
-struct file_operations ntfs_empty_file_ops = {
-       llseek:                 NULL,                   /* . */
-       read:                   NULL,                   /* . */
-       write:                  NULL,                   /* . */
-       readdir:                NULL,                   /* . */
-       poll:                   NULL,                   /* . */
-       ioctl:                  NULL,                   /* . */
-       mmap:                   NULL,                   /* . */
-       open:                   NULL,                   /* . */
-       flush:                  NULL,                   /* . */
-       release:                NULL,                   /* . */
-       fsync:                  NULL,                   /* . */
-       fasync:                 NULL,                   /* . */
-       lock:                   NULL,                   /* . */
-       readv:                  NULL,                   /* . */
-       writev:                 NULL,                   /* . */
-       sendpage:               NULL,                   /* . */
-       get_unmapped_area:      NULL,                   /* . */
-};
-
-struct inode_operations ntfs_empty_inode_ops = {
-       create:         NULL,           /* . */
-       lookup:         NULL,           /* . */
-       link:           NULL,           /* . */
-       unlink:         NULL,           /* . */
-       symlink:        NULL,           /* . */
-       mkdir:          NULL,           /* . */
-       rmdir:          NULL,           /* . */
-       mknod:          NULL,           /* . */
-       rename:         NULL,           /* . */
-       readlink:       NULL,           /* . */
-       follow_link:    NULL,           /* . */
-       truncate:       NULL,           /* . */
-       permission:     NULL,           /* . */
-       revalidate:     NULL,           /* . */
-       setattr:        NULL,           /* . */
-       getattr:        NULL,           /* . */
-};
+struct inode_operations ntfs_empty_inode_ops = {};
 
index d7c7177c98022d5447e4d879b41951d2e0f2abab..f5e8cf8be3e3accf1e3ef493a7431a2d641ddb6a 100644 (file)
@@ -114,13 +114,6 @@ struct address_space_operations ntfs_mft_aops = {
                                                   disk request queue. */
        prepare_write:  NULL,                   /* . */
        commit_write:   NULL,                   /* . */
-       bmap:           NULL,                   /* Needed for FIBMAP.
-                                                  Don't use it. */
-       flushpage:      NULL,                   /* . */
-       releasepage:    NULL,                   /* . */
-#ifdef KERNEL_HAS_O_DIRECT
-       direct_IO:      NULL,                   /* . */
-#endif
 };
 
 /**
index 3dd9f92d002ed6468634de7cecbbafd24c689045..9e1ef4f9641a2008e82c087d71997550bc12689e 100644 (file)
@@ -103,43 +103,6 @@ static struct dentry *ntfs_lookup(struct inode *dir_ino, struct dentry *dent)
 }
 
 struct inode_operations ntfs_dir_inode_ops = {
-       create:         NULL,           /* . */
        lookup:         ntfs_lookup,    /* lookup directory. */
-       link:           NULL,           /* . */
-       unlink:         NULL,           /* . */
-       symlink:        NULL,           /* . */
-       mkdir:          NULL,           /* . */
-       rmdir:          NULL,           /* . */
-       mknod:          NULL,           /* . */
-       rename:         NULL,           /* . */
-       readlink:       NULL,           /* . */
-       follow_link:    NULL,           /* . */
-       truncate:       NULL,           /* . */
-       permission:     NULL,           /* . */
-       revalidate:     NULL,           /* . */
-       setattr:        NULL,           /* . */
-       getattr:        NULL,           /* . */
 };
 
-#if 0
-struct inode_operations {
-       int (*create) (struct inode *,struct dentry *,int);
-       struct dentry * (*lookup) (struct inode *,struct dentry *);
-       int (*link) (struct dentry *,struct inode *,struct dentry *);
-       int (*unlink) (struct inode *,struct dentry *);
-       int (*symlink) (struct inode *,struct dentry *,const char *);
-       int (*mkdir) (struct inode *,struct dentry *,int);
-       int (*rmdir) (struct inode *,struct dentry *);
-       int (*mknod) (struct inode *,struct dentry *,int,int);
-       int (*rename) (struct inode *, struct dentry *,
-                       struct inode *, struct dentry *);
-       int (*readlink) (struct dentry *, char *,int);
-       int (*follow_link) (struct dentry *, struct nameidata *);
-       void (*truncate) (struct inode *);
-       int (*permission) (struct inode *, int);
-       int (*revalidate) (struct dentry *);
-       int (*setattr) (struct dentry *, struct iattr *);
-       int (*getattr) (struct dentry *, struct iattr *);
-};
-#endif
-
index 7f73fe3d1346b1a885c4a3ec5e9989f446e927b7..049babc922de3d5a5d7b7f6fc1a44de04f56aaa3 100644 (file)
@@ -1424,31 +1424,23 @@ struct super_operations ntfs_sops = {
                                                   called from iget(). */
        dirty_inode:    ntfs_dirty_inode,       /* VFS: Called from
                                                   __mark_inode_dirty(). */
-       write_inode:    NULL,           /* VFS: Write dirty inode to disk. */
-       put_inode:      NULL,           /* VFS: Called whenever the reference
-                                          count (i_count) of the inode is
-                                          going to be decreased but before the
-                                          actual decrease. */
-       delete_inode:   NULL,           /* VFS: Delete inode from disk. Called
-                                          when i_count becomes 0 and i_nlink is
-                                          also 0. */
+       //write_inode:  NULL,           /* VFS: Write dirty inode to disk. */
+       //put_inode:    NULL,           /* VFS: Called whenever the reference
+       //                                 count (i_count) of the inode is
+       //                                 going to be decreased but before the
+       //                                 actual decrease. */
+       //delete_inode: NULL,           /* VFS: Delete inode from disk. Called
+       //                                 when i_count becomes 0 and i_nlink is
+       //                                 also 0. */
        put_super:      ntfs_put_super, /* Syscall: umount. */
-       write_super:    NULL,           /* Flush dirty super block to disk. */
-       write_super_lockfs:     NULL,   /* ? */
-       unlockfs:       NULL,           /* ? */
+       //write_super:  NULL,           /* Flush dirty super block to disk. */
+       //write_super_lockfs:   NULL,   /* ? */
+       //unlockfs:     NULL,           /* ? */
        statfs:         ntfs_statfs,    /* Syscall: statfs */
        remount_fs:     ntfs_remount,   /* Syscall: mount -o remount. */
        clear_inode:    ntfs_clear_big_inode,   /* VFS: Called when an inode is
                                                   removed from memory. */
-       umount_begin:   NULL,           /* Forced umount. */
-       /*
-        * These are NFSd support functions but NTFS is a standard fs so
-        * shouldn't need to implement these manually. At least we can try
-        * without and if it doesn't work in some way we can always implement
-        * something here.
-        */
-       fh_to_dentry:   NULL,           /* Get dentry for given file handle. */
-       dentry_to_fh:   NULL,           /* Get file handle for given dentry. */
+       //umount_begin: NULL,           /* Forced umount. */
        show_options:   ntfs_show_options, /* Show mount options in proc. */
 };