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 <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -132,7 +132,7 @@ struct sysv_dir_entry *sysv_find_entry(struct dentry *dentry, struct page **res_
|
||||
{
|
||||
const char * name = dentry->d_name.name;
|
||||
int namelen = dentry->d_name.len;
|
||||
struct inode * dir = dentry->d_parent->d_inode;
|
||||
struct inode * dir = d_inode(dentry->d_parent);
|
||||
unsigned long start, n;
|
||||
unsigned long npages = dir_pages(dir);
|
||||
struct page *page = NULL;
|
||||
@@ -176,7 +176,7 @@ found:
|
||||
|
||||
int sysv_add_link(struct dentry *dentry, struct inode *inode)
|
||||
{
|
||||
struct inode *dir = dentry->d_parent->d_inode;
|
||||
struct inode *dir = d_inode(dentry->d_parent);
|
||||
const char * name = dentry->d_name.name;
|
||||
int namelen = dentry->d_name.len;
|
||||
struct page *page = NULL;
|
||||
|
||||
@@ -30,7 +30,7 @@ const struct file_operations sysv_file_operations = {
|
||||
|
||||
static int sysv_setattr(struct dentry *dentry, struct iattr *attr)
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = d_inode(dentry);
|
||||
int error;
|
||||
|
||||
error = inode_change_ok(inode, attr);
|
||||
|
||||
@@ -443,7 +443,7 @@ static unsigned sysv_nblocks(struct super_block *s, loff_t size)
|
||||
int sysv_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
|
||||
{
|
||||
struct super_block *s = dentry->d_sb;
|
||||
generic_fillattr(dentry->d_inode, stat);
|
||||
generic_fillattr(d_inode(dentry), stat);
|
||||
stat->blocks = (s->s_blocksize / 512) * sysv_nblocks(s, stat->size);
|
||||
stat->blksize = s->s_blocksize;
|
||||
return 0;
|
||||
|
||||
@@ -118,7 +118,7 @@ out_fail:
|
||||
static int sysv_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);
|
||||
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode_inc_link_count(inode);
|
||||
@@ -166,7 +166,7 @@ out_dir:
|
||||
|
||||
static int sysv_unlink(struct inode * dir, struct dentry * dentry)
|
||||
{
|
||||
struct inode * inode = dentry->d_inode;
|
||||
struct inode * inode = d_inode(dentry);
|
||||
struct page * page;
|
||||
struct sysv_dir_entry * de;
|
||||
int err = -ENOENT;
|
||||
@@ -187,7 +187,7 @@ out:
|
||||
|
||||
static int sysv_rmdir(struct inode * dir, struct dentry * dentry)
|
||||
{
|
||||
struct inode *inode = dentry->d_inode;
|
||||
struct inode *inode = d_inode(dentry);
|
||||
int err = -ENOTEMPTY;
|
||||
|
||||
if (sysv_empty_dir(inode)) {
|
||||
@@ -208,8 +208,8 @@ static int sysv_rmdir(struct inode * dir, struct dentry * dentry)
|
||||
static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
|
||||
struct inode * new_dir, struct dentry * new_dentry)
|
||||
{
|
||||
struct inode * old_inode = old_dentry->d_inode;
|
||||
struct inode * new_inode = new_dentry->d_inode;
|
||||
struct inode * old_inode = d_inode(old_dentry);
|
||||
struct inode * new_inode = d_inode(new_dentry);
|
||||
struct page * dir_page = NULL;
|
||||
struct sysv_dir_entry * dir_de = NULL;
|
||||
struct page * old_page;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
static void *sysv_follow_link(struct dentry *dentry, struct nameidata *nd)
|
||||
{
|
||||
nd_set_link(nd, (char *)SYSV_I(dentry->d_inode)->i_data);
|
||||
nd_set_link(nd, (char *)SYSV_I(d_inode(dentry))->i_data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user