Skip to content

Commit

Permalink
vfs: remove ".readlink = generic_readlink" assignments
Browse files Browse the repository at this point in the history
If .readlink == NULL implies generic_readlink().

Generated by:

to_del="\.readlink.*=.*generic_readlink"
for i in `git grep -l $to_del`; do sed -i "/$to_del"/d $i; done

Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
Miklos Szeredi committed Dec 9, 2016
1 parent 76fca90 commit dfeef68
Show file tree
Hide file tree
Showing 38 changed files with 0 additions and 45 deletions.
1 change: 0 additions & 1 deletion drivers/staging/lustre/lustre/llite/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ static const char *ll_get_link(struct dentry *dentry,
}

const struct inode_operations ll_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.setattr = ll_setattr,
.get_link = ll_get_link,
.getattr = ll_getattr,
Expand Down
1 change: 0 additions & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,6 @@ static const struct inode_operations v9fs_file_inode_operations = {
};

static const struct inode_operations v9fs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = v9fs_vfs_get_link,
.getattr = v9fs_vfs_getattr,
.setattr = v9fs_vfs_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/9p/vfs_inode_dotl.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,6 @@ const struct inode_operations v9fs_file_inode_operations_dotl = {
};

const struct inode_operations v9fs_symlink_inode_operations_dotl = {
.readlink = generic_readlink,
.get_link = v9fs_vfs_get_link_dotl,
.getattr = v9fs_vfs_getattr_dotl,
.setattr = v9fs_vfs_setattr_dotl,
Expand Down
1 change: 0 additions & 1 deletion fs/affs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const struct address_space_operations affs_symlink_aops = {
};

const struct inode_operations affs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = affs_notify_change,
};
1 change: 0 additions & 1 deletion fs/autofs4/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,5 @@ static const char *autofs4_get_link(struct dentry *dentry,
}

const struct inode_operations autofs4_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = autofs4_get_link
};
1 change: 0 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -10668,7 +10668,6 @@ static const struct inode_operations btrfs_special_inode_operations = {
.update_time = btrfs_update_time,
};
static const struct inode_operations btrfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.getattr = btrfs_getattr,
.setattr = btrfs_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,6 @@ void __ceph_do_pending_vmtruncate(struct inode *inode)
* symlinks
*/
static const struct inode_operations ceph_symlink_iops = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = ceph_setattr,
.getattr = ceph_getattr,
Expand Down
1 change: 0 additions & 1 deletion fs/cifs/cifsfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,6 @@ const struct inode_operations cifs_file_inode_ops = {
};

const struct inode_operations cifs_symlink_inode_ops = {
.readlink = generic_readlink,
.get_link = cifs_get_link,
.permission = cifs_permission,
.listxattr = cifs_listxattr,
Expand Down
1 change: 0 additions & 1 deletion fs/coda/cnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2)
}

static const struct inode_operations coda_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = coda_setattr,
};
Expand Down
1 change: 0 additions & 1 deletion fs/configfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@ static const char *configfs_get_link(struct dentry *dentry,

const struct inode_operations configfs_symlink_inode_operations = {
.get_link = configfs_get_link,
.readlink = generic_readlink,
.setattr = configfs_setattr,
};

1 change: 0 additions & 1 deletion fs/ecryptfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,6 @@ static int ecryptfs_removexattr(struct dentry *dentry, struct inode *inode,
}

const struct inode_operations ecryptfs_symlink_iops = {
.readlink = generic_readlink,
.get_link = ecryptfs_get_link,
.permission = ecryptfs_permission,
.setattr = ecryptfs_setattr,
Expand Down
2 changes: 0 additions & 2 deletions fs/ext2/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "xattr.h"

const struct inode_operations ext2_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = ext2_setattr,
#ifdef CONFIG_EXT2_FS_XATTR
Expand All @@ -30,7 +29,6 @@ const struct inode_operations ext2_symlink_inode_operations = {
};

const struct inode_operations ext2_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = ext2_setattr,
#ifdef CONFIG_EXT2_FS_XATTR
Expand Down
3 changes: 0 additions & 3 deletions fs/ext4/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,21 +83,18 @@ static const char *ext4_encrypted_get_link(struct dentry *dentry,
}

const struct inode_operations ext4_encrypted_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = ext4_encrypted_get_link,
.setattr = ext4_setattr,
.listxattr = ext4_listxattr,
};

const struct inode_operations ext4_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = ext4_setattr,
.listxattr = ext4_listxattr,
};

const struct inode_operations ext4_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = ext4_setattr,
.listxattr = ext4_listxattr,
Expand Down
2 changes: 0 additions & 2 deletions fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,6 @@ static const char *f2fs_encrypted_get_link(struct dentry *dentry,
}

const struct inode_operations f2fs_encrypted_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = f2fs_encrypted_get_link,
.getattr = f2fs_getattr,
.setattr = f2fs_setattr,
Expand Down Expand Up @@ -1105,7 +1104,6 @@ const struct inode_operations f2fs_dir_inode_operations = {
};

const struct inode_operations f2fs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = f2fs_get_link,
.getattr = f2fs_getattr,
.setattr = f2fs_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,7 +1834,6 @@ static const struct inode_operations fuse_common_inode_operations = {
static const struct inode_operations fuse_symlink_inode_operations = {
.setattr = fuse_setattr,
.get_link = fuse_get_link,
.readlink = generic_readlink,
.getattr = fuse_getattr,
.listxattr = fuse_listxattr,
};
Expand Down
1 change: 0 additions & 1 deletion fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2067,7 +2067,6 @@ const struct inode_operations gfs2_dir_iops = {
};

const struct inode_operations gfs2_symlink_iops = {
.readlink = generic_readlink,
.get_link = gfs2_get_link,
.permission = gfs2_permission,
.setattr = gfs2_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,6 @@ static const char *hostfs_get_link(struct dentry *dentry,
}

static const struct inode_operations hostfs_link_iops = {
.readlink = generic_readlink,
.get_link = hostfs_get_link,
};

Expand Down
1 change: 0 additions & 1 deletion fs/jffs2/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

const struct inode_operations jffs2_symlink_inode_operations =
{
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = jffs2_setattr,
.listxattr = jffs2_listxattr,
Expand Down
2 changes: 0 additions & 2 deletions fs/jfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@
#include "jfs_xattr.h"

const struct inode_operations jfs_fast_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = jfs_setattr,
.listxattr = jfs_listxattr,
};

const struct inode_operations jfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = jfs_setattr,
.listxattr = jfs_listxattr,
Expand Down
1 change: 0 additions & 1 deletion fs/kernfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static const char *kernfs_iop_get_link(struct dentry *dentry,

const struct inode_operations kernfs_symlink_iops = {
.listxattr = kernfs_iop_listxattr,
.readlink = generic_readlink,
.get_link = kernfs_iop_get_link,
.setattr = kernfs_iop_setattr,
.getattr = kernfs_iop_getattr,
Expand Down
1 change: 0 additions & 1 deletion fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,6 @@ EXPORT_SYMBOL(simple_get_link);

const struct inode_operations simple_symlink_inode_operations = {
.get_link = simple_get_link,
.readlink = generic_readlink
};
EXPORT_SYMBOL(simple_symlink_inode_operations);

Expand Down
1 change: 0 additions & 1 deletion fs/minix/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,6 @@ static const struct address_space_operations minix_aops = {
};

static const struct inode_operations minix_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.getattr = minix_getattr,
};
Expand Down
1 change: 0 additions & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -4813,7 +4813,6 @@ int page_symlink(struct inode *inode, const char *symname, int len)
EXPORT_SYMBOL(page_symlink);

const struct inode_operations page_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
};
EXPORT_SYMBOL(page_symlink_inode_operations);
1 change: 0 additions & 1 deletion fs/ncpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)

#if defined(CONFIG_NCPFS_EXTRAS) || defined(CONFIG_NCPFS_NFS_NS)
static const struct inode_operations ncp_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = ncp_notify_change,
};
Expand Down
1 change: 0 additions & 1 deletion fs/nfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static const char *nfs_get_link(struct dentry *dentry,
* symlinks can't do much...
*/
const struct inode_operations nfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = nfs_get_link,
.getattr = nfs_getattr,
.setattr = nfs_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ const struct inode_operations nilfs_special_inode_operations = {
};

const struct inode_operations nilfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.permission = nilfs_permission,
};
Expand Down
1 change: 0 additions & 1 deletion fs/ocfs2/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ const struct address_space_operations ocfs2_fast_symlink_aops = {
};

const struct inode_operations ocfs2_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.getattr = ocfs2_getattr,
.setattr = ocfs2_setattr,
Expand Down
1 change: 0 additions & 1 deletion fs/orangefs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "orangefs-bufmap.h"

const struct inode_operations orangefs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = orangefs_setattr,
.getattr = orangefs_getattr,
Expand Down
1 change: 0 additions & 1 deletion fs/overlayfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ static const struct inode_operations ovl_file_inode_operations = {
static const struct inode_operations ovl_symlink_inode_operations = {
.setattr = ovl_setattr,
.get_link = ovl_get_link,
.readlink = generic_readlink,
.getattr = ovl_getattr,
.listxattr = ovl_listxattr,
.update_time = ovl_update_time,
Expand Down
1 change: 0 additions & 1 deletion fs/proc/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ static const char *proc_get_link(struct dentry *dentry,
}

const struct inode_operations proc_link_inode_operations = {
.readlink = generic_readlink,
.get_link = proc_get_link,
};

Expand Down
1 change: 0 additions & 1 deletion fs/proc/self.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ static const char *proc_self_get_link(struct dentry *dentry,
}

static const struct inode_operations proc_self_inode_operations = {
.readlink = generic_readlink,
.get_link = proc_self_get_link,
};

Expand Down
1 change: 0 additions & 1 deletion fs/proc/thread_self.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ static const char *proc_thread_self_get_link(struct dentry *dentry,
}

static const struct inode_operations proc_thread_self_inode_operations = {
.readlink = generic_readlink,
.get_link = proc_thread_self_get_link,
};

Expand Down
1 change: 0 additions & 1 deletion fs/reiserfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1665,7 +1665,6 @@ const struct inode_operations reiserfs_dir_inode_operations = {
* stuff added
*/
const struct inode_operations reiserfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.setattr = reiserfs_setattr,
.listxattr = reiserfs_listxattr,
Expand Down
1 change: 0 additions & 1 deletion fs/squashfs/symlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ const struct address_space_operations squashfs_symlink_aops = {
};

const struct inode_operations squashfs_symlink_inode_ops = {
.readlink = generic_readlink,
.get_link = page_get_link,
.listxattr = squashfs_listxattr
};
Expand Down
1 change: 0 additions & 1 deletion fs/sysv/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ static inline void write3byte(struct sysv_sb_info *sbi,
}

static const struct inode_operations sysv_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = page_get_link,
.getattr = sysv_getattr,
};
Expand Down
1 change: 0 additions & 1 deletion fs/ubifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1628,7 +1628,6 @@ const struct inode_operations ubifs_file_inode_operations = {
};

const struct inode_operations ubifs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
.setattr = ubifs_setattr,
.getattr = ubifs_getattr,
Expand Down
2 changes: 0 additions & 2 deletions fs/xfs/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,6 @@ static const struct inode_operations xfs_dir_ci_inode_operations = {
};

static const struct inode_operations xfs_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = xfs_vn_get_link,
.getattr = xfs_vn_getattr,
.setattr = xfs_vn_setattr,
Expand All @@ -1131,7 +1130,6 @@ static const struct inode_operations xfs_symlink_inode_operations = {
};

static const struct inode_operations xfs_inline_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = xfs_vn_get_link_inline,
.getattr = xfs_vn_getattr,
.setattr = xfs_vn_setattr,
Expand Down
2 changes: 0 additions & 2 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -3174,15 +3174,13 @@ static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size)
#endif /* CONFIG_TMPFS_XATTR */

static const struct inode_operations shmem_short_symlink_operations = {
.readlink = generic_readlink,
.get_link = simple_get_link,
#ifdef CONFIG_TMPFS_XATTR
.listxattr = shmem_listxattr,
#endif
};

static const struct inode_operations shmem_symlink_inode_operations = {
.readlink = generic_readlink,
.get_link = shmem_get_link,
#ifdef CONFIG_TMPFS_XATTR
.listxattr = shmem_listxattr,
Expand Down

0 comments on commit dfeef68

Please sign in to comment.