summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 18:48:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-26 20:22:07 -0400
commit9ec3a646fe09970f801ab15e0f1694060b9f19af (patch)
tree697058ca7e1671eda180a3ccc62445686fbc1a31 /fs/ext2
parentc8b3fd0ce313443731e8fd6d5a541085eb465f99 (diff)
parent3cab989afd8d8d1bc3d99fef0e7ed87c31e7b647 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull fourth vfs update from Al Viro: "d_inode() annotations from David Howells (sat in for-next since before the beginning of merge window) + four assorted fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: RCU pathwalk breakage when running into a symlink overmounting something fix I_DIO_WAKEUP definition direct-io: only inc/dec inode->i_dio_count for file systems fs/9p: fix readdir() VFS: assorted d_backing_inode() annotations VFS: fs/inode.c helpers: d_inode() annotations VFS: fs/cachefiles: d_backing_inode() annotations VFS: fs library helpers: d_inode() annotations VFS: assorted weird filesystems: d_inode() annotations VFS: normal filesystems (and lustre): d_inode() annotations VFS: security/: d_inode() annotations VFS: security/: d_backing_inode() annotations VFS: net/: d_inode() annotations VFS: net/unix: d_backing_inode() annotations VFS: kernel/: d_inode() annotations VFS: audit: d_backing_inode() annotations VFS: Fix up some ->d_inode accesses in the chelsio driver VFS: Cachefiles should perform fs modifications on the top layer only VFS: AF_UNIX sockets should call mknod on the top layer only
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/dir.c2
-rw-r--r--fs/ext2/ialloc.c2
-rw-r--r--fs/ext2/inode.c2
-rw-r--r--fs/ext2/namei.c14
-rw-r--r--fs/ext2/symlink.c2
-rw-r--r--fs/ext2/xattr.c4
-rw-r--r--fs/ext2/xattr_security.c4
-rw-r--r--fs/ext2/xattr_trusted.c4
-rw-r--r--fs/ext2/xattr_user.c4
9 files changed, 19 insertions, 19 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index 6e1d4ab09d72..796b491e6978 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -486,7 +486,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
486 */ 486 */
487int ext2_add_link (struct dentry *dentry, struct inode *inode) 487int ext2_add_link (struct dentry *dentry, struct inode *inode)
488{ 488{
489 struct inode *dir = dentry->d_parent->d_inode; 489 struct inode *dir = d_inode(dentry->d_parent);
490 const char *name = dentry->d_name.name; 490 const char *name = dentry->d_name.name;
491 int namelen = dentry->d_name.len; 491 int namelen = dentry->d_name.len;
492 unsigned chunk_size = ext2_chunk_size(dir); 492 unsigned chunk_size = ext2_chunk_size(dir);
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 6c14bb8322fa..5c04a0ddea80 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -278,7 +278,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
278 avefreeb = free_blocks / ngroups; 278 avefreeb = free_blocks / ngroups;
279 ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter); 279 ndirs = percpu_counter_read_positive(&sbi->s_dirs_counter);
280 280
281 if ((parent == sb->s_root->d_inode) || 281 if ((parent == d_inode(sb->s_root)) ||
282 (EXT2_I(parent)->i_flags & EXT2_TOPDIR_FL)) { 282 (EXT2_I(parent)->i_flags & EXT2_TOPDIR_FL)) {
283 struct ext2_group_desc *best_desc = NULL; 283 struct ext2_group_desc *best_desc = NULL;
284 int best_ndir = inodes_per_group; 284 int best_ndir = inodes_per_group;
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 5d9213963fae..f460ae36d5b7 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1544,7 +1544,7 @@ int ext2_write_inode(struct inode *inode, struct writeback_control *wbc)
1544 1544
1545int ext2_setattr(struct dentry *dentry, struct iattr *iattr) 1545int ext2_setattr(struct dentry *dentry, struct iattr *iattr)
1546{ 1546{
1547 struct inode *inode = dentry->d_inode; 1547 struct inode *inode = d_inode(dentry);
1548 int error; 1548 int error;
1549 1549
1550 error = inode_change_ok(inode, iattr); 1550 error = inode_change_ok(inode, iattr);
diff --git a/fs/ext2/namei.c b/fs/ext2/namei.c
index ce422931f411..3e074a9ccbe6 100644
--- a/fs/ext2/namei.c
+++ b/fs/ext2/namei.c
@@ -79,10 +79,10 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, uns
79struct dentry *ext2_get_parent(struct dentry *child) 79struct dentry *ext2_get_parent(struct dentry *child)
80{ 80{
81 struct qstr dotdot = QSTR_INIT("..", 2); 81 struct qstr dotdot = QSTR_INIT("..", 2);
82 unsigned long ino = ext2_inode_by_name(child->d_inode, &dotdot); 82 unsigned long ino = ext2_inode_by_name(d_inode(child), &dotdot);
83 if (!ino) 83 if (!ino)
84 return ERR_PTR(-ENOENT); 84 return ERR_PTR(-ENOENT);
85 return d_obtain_alias(ext2_iget(child->d_inode->i_sb, ino)); 85 return d_obtain_alias(ext2_iget(d_inode(child)->i_sb, ino));
86} 86}
87 87
88/* 88/*
@@ -208,7 +208,7 @@ out_fail:
208static int ext2_link (struct dentry * old_dentry, struct inode * dir, 208static int ext2_link (struct dentry * old_dentry, struct inode * dir,
209 struct dentry *dentry) 209 struct dentry *dentry)
210{ 210{
211 struct inode *inode = old_dentry->d_inode; 211 struct inode *inode = d_inode(old_dentry);
212 int err; 212 int err;
213 213
214 dquot_initialize(dir); 214 dquot_initialize(dir);
@@ -275,7 +275,7 @@ out_dir:
275 275
276static int ext2_unlink(struct inode * dir, struct dentry *dentry) 276static int ext2_unlink(struct inode * dir, struct dentry *dentry)
277{ 277{
278 struct inode * inode = dentry->d_inode; 278 struct inode * inode = d_inode(dentry);
279 struct ext2_dir_entry_2 * de; 279 struct ext2_dir_entry_2 * de;
280 struct page * page; 280 struct page * page;
281 int err = -ENOENT; 281 int err = -ENOENT;
@@ -299,7 +299,7 @@ out:
299 299
300static int ext2_rmdir (struct inode * dir, struct dentry *dentry) 300static int ext2_rmdir (struct inode * dir, struct dentry *dentry)
301{ 301{
302 struct inode * inode = dentry->d_inode; 302 struct inode * inode = d_inode(dentry);
303 int err = -ENOTEMPTY; 303 int err = -ENOTEMPTY;
304 304
305 if (ext2_empty_dir(inode)) { 305 if (ext2_empty_dir(inode)) {
@@ -316,8 +316,8 @@ static int ext2_rmdir (struct inode * dir, struct dentry *dentry)
316static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry, 316static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
317 struct inode * new_dir, struct dentry * new_dentry ) 317 struct inode * new_dir, struct dentry * new_dentry )
318{ 318{
319 struct inode * old_inode = old_dentry->d_inode; 319 struct inode * old_inode = d_inode(old_dentry);
320 struct inode * new_inode = new_dentry->d_inode; 320 struct inode * new_inode = d_inode(new_dentry);
321 struct page * dir_page = NULL; 321 struct page * dir_page = NULL;
322 struct ext2_dir_entry_2 * dir_de = NULL; 322 struct ext2_dir_entry_2 * dir_de = NULL;
323 struct page * old_page; 323 struct page * old_page;
diff --git a/fs/ext2/symlink.c b/fs/ext2/symlink.c
index 565cf817bbf1..20608f17c2e5 100644
--- a/fs/ext2/symlink.c
+++ b/fs/ext2/symlink.c
@@ -23,7 +23,7 @@
23 23
24static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd) 24static void *ext2_follow_link(struct dentry *dentry, struct nameidata *nd)
25{ 25{
26 struct ext2_inode_info *ei = EXT2_I(dentry->d_inode); 26 struct ext2_inode_info *ei = EXT2_I(d_inode(dentry));
27 nd_set_link(nd, (char *)ei->i_data); 27 nd_set_link(nd, (char *)ei->i_data);
28 return NULL; 28 return NULL;
29} 29}
diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 91426141c33a..0b6bfd3a398b 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -243,7 +243,7 @@ cleanup:
243static int 243static int
244ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size) 244ext2_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
245{ 245{
246 struct inode *inode = dentry->d_inode; 246 struct inode *inode = d_inode(dentry);
247 struct buffer_head *bh = NULL; 247 struct buffer_head *bh = NULL;
248 struct ext2_xattr_entry *entry; 248 struct ext2_xattr_entry *entry;
249 char *end; 249 char *end;
@@ -319,7 +319,7 @@ cleanup:
319/* 319/*
320 * Inode operation listxattr() 320 * Inode operation listxattr()
321 * 321 *
322 * dentry->d_inode->i_mutex: don't care 322 * d_inode(dentry)->i_mutex: don't care
323 */ 323 */
324ssize_t 324ssize_t
325ext2_listxattr(struct dentry *dentry, char *buffer, size_t size) 325ext2_listxattr(struct dentry *dentry, char *buffer, size_t size)
diff --git a/fs/ext2/xattr_security.c b/fs/ext2/xattr_security.c
index c0ebc4db8849..702fc6840246 100644
--- a/fs/ext2/xattr_security.c
+++ b/fs/ext2/xattr_security.c
@@ -28,7 +28,7 @@ ext2_xattr_security_get(struct dentry *dentry, const char *name,
28{ 28{
29 if (strcmp(name, "") == 0) 29 if (strcmp(name, "") == 0)
30 return -EINVAL; 30 return -EINVAL;
31 return ext2_xattr_get(dentry->d_inode, EXT2_XATTR_INDEX_SECURITY, name, 31 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_SECURITY, name,
32 buffer, size); 32 buffer, size);
33} 33}
34 34
@@ -38,7 +38,7 @@ ext2_xattr_security_set(struct dentry *dentry, const char *name,
38{ 38{
39 if (strcmp(name, "") == 0) 39 if (strcmp(name, "") == 0)
40 return -EINVAL; 40 return -EINVAL;
41 return ext2_xattr_set(dentry->d_inode, EXT2_XATTR_INDEX_SECURITY, name, 41 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_SECURITY, name,
42 value, size, flags); 42 value, size, flags);
43} 43}
44 44
diff --git a/fs/ext2/xattr_trusted.c b/fs/ext2/xattr_trusted.c
index 7e192574c001..42b6e9874bcc 100644
--- a/fs/ext2/xattr_trusted.c
+++ b/fs/ext2/xattr_trusted.c
@@ -32,7 +32,7 @@ ext2_xattr_trusted_get(struct dentry *dentry, const char *name,
32{ 32{
33 if (strcmp(name, "") == 0) 33 if (strcmp(name, "") == 0)
34 return -EINVAL; 34 return -EINVAL;
35 return ext2_xattr_get(dentry->d_inode, EXT2_XATTR_INDEX_TRUSTED, name, 35 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_TRUSTED, name,
36 buffer, size); 36 buffer, size);
37} 37}
38 38
@@ -42,7 +42,7 @@ ext2_xattr_trusted_set(struct dentry *dentry, const char *name,
42{ 42{
43 if (strcmp(name, "") == 0) 43 if (strcmp(name, "") == 0)
44 return -EINVAL; 44 return -EINVAL;
45 return ext2_xattr_set(dentry->d_inode, EXT2_XATTR_INDEX_TRUSTED, name, 45 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_TRUSTED, name,
46 value, size, flags); 46 value, size, flags);
47} 47}
48 48
diff --git a/fs/ext2/xattr_user.c b/fs/ext2/xattr_user.c
index f470e44c4b8d..ecdc4605192c 100644
--- a/fs/ext2/xattr_user.c
+++ b/fs/ext2/xattr_user.c
@@ -36,7 +36,7 @@ ext2_xattr_user_get(struct dentry *dentry, const char *name,
36 return -EINVAL; 36 return -EINVAL;
37 if (!test_opt(dentry->d_sb, XATTR_USER)) 37 if (!test_opt(dentry->d_sb, XATTR_USER))
38 return -EOPNOTSUPP; 38 return -EOPNOTSUPP;
39 return ext2_xattr_get(dentry->d_inode, EXT2_XATTR_INDEX_USER, 39 return ext2_xattr_get(d_inode(dentry), EXT2_XATTR_INDEX_USER,
40 name, buffer, size); 40 name, buffer, size);
41} 41}
42 42
@@ -49,7 +49,7 @@ ext2_xattr_user_set(struct dentry *dentry, const char *name,
49 if (!test_opt(dentry->d_sb, XATTR_USER)) 49 if (!test_opt(dentry->d_sb, XATTR_USER))
50 return -EOPNOTSUPP; 50 return -EOPNOTSUPP;
51 51
52 return ext2_xattr_set(dentry->d_inode, EXT2_XATTR_INDEX_USER, 52 return ext2_xattr_set(d_inode(dentry), EXT2_XATTR_INDEX_USER,
53 name, value, size, flags); 53 name, value, size, flags);
54} 54}
55 55