VFS: normal filesystems (and lustre): d_inode() annotations

that's the bulk of filesystem drivers dealing with inodes of their own

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
David Howells 2015-03-17 22:25:59 +00:00 • committed by Al Viro
commit 2b0143b5c9
278 changed files with 1419 additions and 1420 deletions

View file

@ -138,7 +138,7 @@ affs_fix_dcache(struct inode *inode, u32 entry_ino)
static int
affs_remove_link(struct dentry *dentry)
{
struct inode *dir, *inode = dentry->d_inode;
struct inode *dir, *inode = d_inode(dentry);
struct super_block *sb = inode->i_sb;
struct buffer_head *bh = NULL, *link_bh = NULL;
u32 link_ino, ino;
@ -268,11 +268,11 @@ affs_remove_header(struct dentry *dentry)
struct buffer_head *bh = NULL;
int retval;
dir = dentry->d_parent->d_inode;
dir = d_inode(dentry->d_parent);
sb = dir->i_sb;
retval = -ENOENT;
inode = dentry->d_inode;
inode = d_inode(dentry);
if (!inode)
goto done;
@ -471,7 +471,7 @@ affs_warning(struct super_block *sb, const char *function, const char *fmt, ...)
bool
affs_nofilenametruncate(const struct dentry *dentry)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = d_inode(dentry);
return AFFS_SB(inode->i_sb)->s_flags & SF_NO_TRUNCATE;
}

View file

@ -212,7 +212,7 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
int
affs_notify_change(struct dentry *dentry, struct iattr *attr)
{
struct inode *inode = dentry->d_inode;
struct inode *inode = d_inode(dentry);
int error;
pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid);

View file

@ -250,7 +250,7 @@ int
affs_unlink(struct inode *dir, struct dentry *dentry)
{
pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
dentry->d_inode->i_ino, dentry);
d_inode(dentry)->i_ino, dentry);
return affs_remove_header(dentry);
}
@ -318,7 +318,7 @@ int
affs_rmdir(struct inode *dir, struct dentry *dentry)
{
pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
dentry->d_inode->i_ino, dentry);
d_inode(dentry)->i_ino, dentry);
return affs_remove_header(dentry);
}
@ -401,7 +401,7 @@ err:
int
affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
{
struct inode *inode = old_dentry->d_inode;
struct inode *inode = d_inode(old_dentry);
pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino,
dentry);
@ -428,13 +428,13 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
return retval;
/* Unlink destination if it already exists */
if (new_dentry->d_inode) {
if (d_really_is_positive(new_dentry)) {
retval = affs_remove_header(new_dentry);
if (retval)
return retval;
}
bh = affs_bread(sb, old_dentry->d_inode->i_ino);
bh = affs_bread(sb, d_inode(old_dentry)->i_ino);
if (!bh)
return -EIO;