VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)
Convert the following where appropriate: (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry). (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry). (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry). This is actually more complicated than it appears as some calls should be converted to d_can_lookup() instead. The difference is whether the directory in question is a real dir with a ->lookup op or whether it's a fake dir with a ->d_automount op. In some circumstances, we can subsume checks for dentry->d_inode not being NULL into this, provided we the code isn't in a filesystem that expects d_inode to be NULL if the dirent really *is* negative (ie. if we're going to use d_inode() rather than d_backing_inode() to get the inode pointer). Note that the dentry type field may be set to something other than DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS manages the fall-through from a...
Showing
- arch/s390/hypfs/inode.c 1 addition, 1 deletionarch/s390/hypfs/inode.c
- fs/9p/vfs_inode.c 1 addition, 1 deletionfs/9p/vfs_inode.c
- fs/autofs4/expire.c 1 addition, 1 deletionfs/autofs4/expire.c
- fs/autofs4/root.c 2 additions, 2 deletionsfs/autofs4/root.c
- fs/btrfs/ioctl.c 2 additions, 2 deletionsfs/btrfs/ioctl.c
- fs/cachefiles/daemon.c 2 additions, 2 deletionsfs/cachefiles/daemon.c
- fs/cachefiles/namei.c 8 additions, 8 deletionsfs/cachefiles/namei.c
- fs/ceph/dir.c 1 addition, 1 deletionfs/ceph/dir.c
- fs/ceph/file.c 1 addition, 1 deletionfs/ceph/file.c
- fs/coda/dir.c 1 addition, 1 deletionfs/coda/dir.c
- fs/debugfs/inode.c 1 addition, 1 deletionfs/debugfs/inode.c
- fs/ecryptfs/file.c 1 addition, 1 deletionfs/ecryptfs/file.c
- fs/ecryptfs/inode.c 2 additions, 2 deletionsfs/ecryptfs/inode.c
- fs/exportfs/expfs.c 1 addition, 1 deletionfs/exportfs/expfs.c
- fs/fuse/dir.c 1 addition, 1 deletionfs/fuse/dir.c
- fs/gfs2/dir.c 1 addition, 1 deletionfs/gfs2/dir.c
- fs/hfsplus/dir.c 1 addition, 1 deletionfs/hfsplus/dir.c
- fs/hppfs/hppfs.c 2 additions, 2 deletionsfs/hppfs/hppfs.c
- fs/jffs2/dir.c 7 additions, 7 deletionsfs/jffs2/dir.c
- fs/jffs2/super.c 1 addition, 1 deletionfs/jffs2/super.c
Please register or sign in to comment