]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
exportfs: make struct export_operations const
authorChristoph Hellwig <hch@lst.de>
Sun, 21 Oct 2007 23:42:17 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 22 Oct 2007 15:13:21 +0000 (08:13 -0700)
Now that nfsd has stopped writing to the find_exported_dentry member we an
mark the export_operations const

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Neil Brown <neilb@suse.de>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: <linux-ext4@vger.kernel.org>
Cc: Dave Kleikamp <shaggy@austin.ibm.com>
Cc: Anton Altaparmakov <aia21@cantab.net>
Cc: David Chinner <dgc@sgi.com>
Cc: Timothy Shimmin <tes@sgi.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Chris Mason <mason@suse.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: "Vladimir V. Saveliev" <vs@namesys.com>
Cc: Steven Whitehouse <swhiteho@redhat.com>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
22 files changed:
fs/cifs/cifsfs.h
fs/cifs/export.c
fs/efs/super.c
fs/exportfs/expfs.c
fs/ext2/super.c
fs/ext3/super.c
fs/ext4/super.c
fs/fat/inode.c
fs/gfs2/ops_export.c
fs/gfs2/ops_fstype.h
fs/isofs/export.c
fs/isofs/isofs.h
fs/jfs/super.c
fs/ntfs/namei.c
fs/ntfs/ntfs.h
fs/ocfs2/export.c
fs/ocfs2/export.h
fs/reiserfs/super.c
fs/xfs/linux-2.6/xfs_export.c
fs/xfs/linux-2.6/xfs_super.h
include/linux/fs.h
mm/shmem.c

index 0a3ee5a322b02a4329c1448dea61713a1c422f24..5574ba3ab1f9c3c669b5f3e606bff729bcc2ebd6 100644 (file)
@@ -103,7 +103,7 @@ extern int cifs_ioctl(struct inode *inode, struct file *filep,
                       unsigned int command, unsigned long arg);
 
 #ifdef CONFIG_CIFS_EXPERIMENTAL
-extern struct export_operations cifs_export_ops;
+extern const struct export_operations cifs_export_ops;
 #endif /* EXPERIMENTAL */
 
 #define CIFS_VERSION   "1.51"
index d614b91caeca5f53ad188dd5f20735f1a88d9501..75949d6a5f1b33484635f6019d08a6f66402cefd 100644 (file)
@@ -53,7 +53,7 @@ static struct dentry *cifs_get_parent(struct dentry *dentry)
        return ERR_PTR(-EACCES);
 }
 
-struct export_operations cifs_export_ops = {
+const struct export_operations cifs_export_ops = {
        .get_parent = cifs_get_parent,
 /*     Following five export operations are unneeded so far and can default:
        .get_dentry =
index d8ce21b82fba189402c4e692e7f6668abce8e7ab..c79bc627f1079adf72ac3779befdda1540272dec 100644 (file)
@@ -113,7 +113,7 @@ static const struct super_operations efs_superblock_operations = {
        .remount_fs     = efs_remount,
 };
 
-static struct export_operations efs_export_ops = {
+static const struct export_operations efs_export_ops = {
        .fh_to_dentry   = efs_fh_to_dentry,
        .fh_to_parent   = efs_fh_to_parent,
        .get_parent     = efs_get_parent,
index e68f0279f4b07ccf57e2827a149ba18b7d926800..352465312398f883f96a1d308c425647ef6c502e 100644 (file)
@@ -16,7 +16,7 @@ static int get_name(struct dentry *dentry, char *name,
 static int exportfs_get_name(struct dentry *dir, char *name,
                struct dentry *child)
 {
-       struct export_operations *nop = dir->d_sb->s_export_op;
+       const struct export_operations *nop = dir->d_sb->s_export_op;
 
        if (nop->get_name)
                return nop->get_name(dir, name, child);
@@ -333,7 +333,7 @@ static int export_encode_fh(struct dentry *dentry, struct fid *fid,
 int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, int *max_len,
                int connectable)
 {
-       struct export_operations *nop = dentry->d_sb->s_export_op;
+       const struct export_operations *nop = dentry->d_sb->s_export_op;
        int error;
 
        if (nop->encode_fh)
@@ -349,7 +349,7 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
                int fh_len, int fileid_type,
                int (*acceptable)(void *, struct dentry *), void *context)
 {
-       struct export_operations *nop = mnt->mnt_sb->s_export_op;
+       const struct export_operations *nop = mnt->mnt_sb->s_export_op;
        struct dentry *result, *alias;
        int err;
 
index 4a03d0c84df2a4276d3b688345ab211bf839261a..154e25f13d772235e7c7d242a0b5e6fdbf977cd7 100644 (file)
@@ -357,7 +357,7 @@ static struct dentry *ext2_fh_to_parent(struct super_block *sb, struct fid *fid,
  * systems, but can be improved upon.
  * Currently only get_parent is required.
  */
-static struct export_operations ext2_export_ops = {
+static const struct export_operations ext2_export_ops = {
        .fh_to_dentry = ext2_fh_to_dentry,
        .fh_to_parent = ext2_fh_to_parent,
        .get_parent = ext2_get_parent,
index 6a66f3d02b750084949a27fe3dd42d27e0d2815f..de55da9e28ba618b85b7d7831793dec0e44a7d72 100644 (file)
@@ -741,7 +741,7 @@ static const struct super_operations ext3_sops = {
 #endif
 };
 
-static struct export_operations ext3_export_ops = {
+static const struct export_operations ext3_export_ops = {
        .fh_to_dentry = ext3_fh_to_dentry,
        .fh_to_parent = ext3_fh_to_parent,
        .get_parent = ext3_get_parent,
index 9f0d37a4c4df5a503d62658ca320650a7be7f380..8031dc0e24e5d7eccc2f984a9ac92d24e97c40d2 100644 (file)
@@ -796,7 +796,7 @@ static const struct super_operations ext4_sops = {
 #endif
 };
 
-static struct export_operations ext4_export_ops = {
+static const struct export_operations ext4_export_ops = {
        .fh_to_dentry = ext4_fh_to_dentry,
        .fh_to_parent = ext4_fh_to_parent,
        .get_parent = ext4_get_parent,
index 14d75fcaf2b73809fe525cf225b6d092ea230a1d..920a576e1c25e26240c8ed583cbdfce7e4452e4e 100644 (file)
@@ -774,7 +774,7 @@ out:
        return parent;
 }
 
-static struct export_operations fat_export_ops = {
+static const struct export_operations fat_export_ops = {
        .encode_fh      = fat_encode_fh,
        .fh_to_dentry   = fat_fh_to_dentry,
        .get_parent     = fat_get_parent,
index c291005ec59223e143ca38199861a94a450cd2f0..b9da62348a877303a777884c35f08c2083e640d5 100644 (file)
@@ -294,7 +294,7 @@ static struct dentry *gfs2_fh_to_parent(struct super_block *sb, struct fid *fid,
        }
 }
 
-struct export_operations gfs2_export_ops = {
+const struct export_operations gfs2_export_ops = {
        .encode_fh = gfs2_encode_fh,
        .fh_to_dentry = gfs2_fh_to_dentry,
        .fh_to_parent = gfs2_fh_to_parent,
index 407029b3b2b3857b6564126fe191d1bc96094c67..da849051183654131be35f18df854f30ad400437 100644 (file)
@@ -14,6 +14,6 @@
 
 extern struct file_system_type gfs2_fs_type;
 extern struct file_system_type gfs2meta_fs_type;
-extern struct export_operations gfs2_export_ops;
+extern const struct export_operations gfs2_export_ops;
 
 #endif /* __OPS_FSTYPE_DOT_H__ */
index 511c3513433f6ef99424c32118d5a43c6b7e3c79..29f9753ae5e5ba45c25eec7eaf26261ab6441b42 100644 (file)
@@ -207,7 +207,7 @@ static struct dentry *isofs_fh_to_parent(struct super_block *sb,
                        fh_len > 4 ? ifid->parent_generation : 0);
 }
 
-struct export_operations isofs_export_ops = {
+const struct export_operations isofs_export_ops = {
        .encode_fh      = isofs_export_encode_fh,
        .fh_to_dentry   = isofs_fh_to_dentry,
        .fh_to_parent   = isofs_fh_to_parent,
index a07e67b1ea7fb4b6e49f375d6a71c1b5ec879c16..f3213f9f89afcfaa79f98fc9bb2a61f2165fca0f 100644 (file)
@@ -178,4 +178,4 @@ isofs_normalize_block_and_offset(struct iso_directory_record* de,
 extern const struct inode_operations isofs_dir_inode_operations;
 extern const struct file_operations isofs_dir_operations;
 extern const struct address_space_operations isofs_symlink_aops;
-extern struct export_operations isofs_export_ops;
+extern const struct export_operations isofs_export_ops;
index 81c3228ca4551abd038891b4fd10901ee8978bfd..314bb4ff1ba8a185715c8979feee658613eb6f13 100644 (file)
@@ -48,7 +48,7 @@ MODULE_LICENSE("GPL");
 static struct kmem_cache * jfs_inode_cachep;
 
 static const struct super_operations jfs_super_operations;
-static struct export_operations jfs_export_operations;
+static const struct export_operations jfs_export_operations;
 static struct file_system_type jfs_fs_type;
 
 #define MAX_COMMIT_THREADS 64
@@ -737,7 +737,7 @@ static const struct super_operations jfs_super_operations = {
 #endif
 };
 
-static struct export_operations jfs_export_operations = {
+static const struct export_operations jfs_export_operations = {
        .fh_to_dentry   = jfs_fh_to_dentry,
        .fh_to_parent   = jfs_fh_to_parent,
        .get_parent     = jfs_get_parent,
index 887c5e131093b688c542013d03157191ec7ec50b..e1781c8b16504cf9c59333c3ac5b7475b9978578 100644 (file)
@@ -499,7 +499,7 @@ static struct dentry *ntfs_fh_to_parent(struct super_block *sb, struct fid *fid,
  * allowing the inode number 0 which is used in NTFS for the system file $MFT
  * and due to using iget() whereas NTFS needs ntfs_iget().
  */
-struct export_operations ntfs_export_ops = {
+const struct export_operations ntfs_export_ops = {
        .get_parent     = ntfs_get_parent,      /* Find the parent of a given
                                                   directory. */
        .fh_to_dentry   = ntfs_fh_to_dentry,
index d73f5a9ac341b62d658ecf81dd8d3eebf142c685..d6a340bf80fce0e18909e037901e293c728dc27b 100644 (file)
@@ -69,7 +69,7 @@ extern const struct inode_operations ntfs_dir_inode_ops;
 extern const struct  file_operations ntfs_empty_file_ops;
 extern const struct inode_operations ntfs_empty_inode_ops;
 
-extern struct export_operations ntfs_export_ops;
+extern const struct export_operations ntfs_export_ops;
 
 /**
  * NTFS_SB - return the ntfs volume given a vfs super block
index 3ad83e34dd39a0268563857d4ef2604326ba5b80..535bfa9568a4af534a9cfbe91a025dd854e2c9f3 100644 (file)
@@ -222,7 +222,7 @@ static struct dentry *ocfs2_fh_to_parent(struct super_block *sb,
        return ocfs2_get_dentry(sb, &parent);
 }
 
-struct export_operations ocfs2_export_ops = {
+const struct export_operations ocfs2_export_ops = {
        .encode_fh      = ocfs2_encode_fh,
        .fh_to_dentry   = ocfs2_fh_to_dentry,
        .fh_to_parent   = ocfs2_fh_to_parent,
index e08bed9e45a09a2c5dfe9aba7d834d9f85c541e3..41a738678c374c581b0a11963b7f6ef6b62712e6 100644 (file)
@@ -28,6 +28,6 @@
 
 #include <linux/exportfs.h>
 
-extern struct export_operations ocfs2_export_ops;
+extern const struct export_operations ocfs2_export_ops;
 
 #endif /* OCFS2_EXPORT_H */
index 708269f752066c2f01c65889bda7509e8fc9feff..5cd85fe5df5d9671516a03d3c9927b96ea0e7c63 100644 (file)
@@ -661,7 +661,7 @@ static struct quotactl_ops reiserfs_qctl_operations = {
 };
 #endif
 
-static struct export_operations reiserfs_export_ops = {
+static const struct export_operations reiserfs_export_ops = {
        .encode_fh = reiserfs_encode_fh,
        .fh_to_dentry = reiserfs_fh_to_dentry,
        .fh_to_parent = reiserfs_fh_to_parent,
index 7178d61f002e0549b8fa1143d312da094ab5df2b..15bd4948832ce7b1f789074b4ec77f53d0a9e25a 100644 (file)
@@ -220,7 +220,7 @@ xfs_fs_get_parent(
        return parent;
 }
 
-struct export_operations xfs_export_operations = {
+const struct export_operations xfs_export_operations = {
        .encode_fh              = xfs_fs_encode_fh,
        .fh_to_dentry           = xfs_fs_fh_to_dentry,
        .fh_to_parent           = xfs_fs_fh_to_parent,
index c78c23310fe85296f00affc28796fe58d419c544..3efcf45b14abed330cd482a8370b76c398572fde 100644 (file)
@@ -118,7 +118,7 @@ extern int  xfs_blkdev_get(struct xfs_mount *, const char *,
 extern void xfs_blkdev_put(struct block_device *);
 extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
 
-extern struct export_operations xfs_export_operations;
+extern const struct export_operations xfs_export_operations;
 
 #define XFS_M(sb)              ((struct xfs_mount *)((sb)->s_fs_info))
 
index 50078bb30a1cb6c460fc043117bb38334a614c86..b3ec4a496d64faa3a380827abed7b54d9d8bd7da 100644 (file)
@@ -987,7 +987,7 @@ struct super_block {
        const struct super_operations   *s_op;
        struct dquot_operations *dq_op;
        struct quotactl_ops     *s_qcop;
-       struct export_operations *s_export_op;
+       const struct export_operations *s_export_op;
        unsigned long           s_flags;
        unsigned long           s_magic;
        struct dentry           *s_root;
index 9dd219e6e059b538d2055cfbf8a9a27374cac7e8..404e53bb212764f8a6ab7f5bf688c54d4d4c9d06 100644 (file)
@@ -2071,7 +2071,7 @@ static int shmem_encode_fh(struct dentry *dentry, __u32 *fh, int *len,
        return 1;
 }
 
-static struct export_operations shmem_export_ops = {
+static const struct export_operations shmem_export_ops = {
        .get_parent     = shmem_get_parent,
        .encode_fh      = shmem_encode_fh,
        .fh_to_dentry   = shmem_fh_to_dentry,