summaryrefslogtreecommitdiffstats
path: root/fs/affs
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/affs
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/affs')
-rw-r--r--fs/affs/amigaffs.c9
-rw-r--r--fs/affs/inode.c2
-rw-r--r--fs/affs/namei.c10
3 files changed, 10 insertions, 11 deletions
diff --git a/fs/affs/amigaffs.c b/fs/affs/amigaffs.c
index 5022ac96aa40..a8f463c028ce 100644
--- a/fs/affs/amigaffs.c
+++ b/fs/affs/amigaffs.c
@@ -138,7 +138,7 @@ affs_fix_dcache(struct inode *inode, u32 entry_ino)
138static int 138static int
139affs_remove_link(struct dentry *dentry) 139affs_remove_link(struct dentry *dentry)
140{ 140{
141 struct inode *dir, *inode = dentry->d_inode; 141 struct inode *dir, *inode = d_inode(dentry);
142 struct super_block *sb = inode->i_sb; 142 struct super_block *sb = inode->i_sb;
143 struct buffer_head *bh = NULL, *link_bh = NULL; 143 struct buffer_head *bh = NULL, *link_bh = NULL;
144 u32 link_ino, ino; 144 u32 link_ino, ino;
@@ -268,11 +268,11 @@ affs_remove_header(struct dentry *dentry)
268 struct buffer_head *bh = NULL; 268 struct buffer_head *bh = NULL;
269 int retval; 269 int retval;
270 270
271 dir = dentry->d_parent->d_inode; 271 dir = d_inode(dentry->d_parent);
272 sb = dir->i_sb; 272 sb = dir->i_sb;
273 273
274 retval = -ENOENT; 274 retval = -ENOENT;
275 inode = dentry->d_inode; 275 inode = d_inode(dentry);
276 if (!inode) 276 if (!inode)
277 goto done; 277 goto done;
278 278
@@ -471,10 +471,9 @@ affs_warning(struct super_block *sb, const char *function, const char *fmt, ...)
471bool 471bool
472affs_nofilenametruncate(const struct dentry *dentry) 472affs_nofilenametruncate(const struct dentry *dentry)
473{ 473{
474 struct inode *inode = dentry->d_inode; 474 struct inode *inode = d_inode(dentry);
475 475
476 return affs_test_opt(AFFS_SB(inode->i_sb)->s_flags, SF_NO_TRUNCATE); 476 return affs_test_opt(AFFS_SB(inode->i_sb)->s_flags, SF_NO_TRUNCATE);
477
478} 477}
479 478
480/* Check if the name is valid for a affs object. */ 479/* Check if the name is valid for a affs object. */
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 9628003ccd2f..a022f4accd76 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -213,7 +213,7 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
213int 213int
214affs_notify_change(struct dentry *dentry, struct iattr *attr) 214affs_notify_change(struct dentry *dentry, struct iattr *attr)
215{ 215{
216 struct inode *inode = dentry->d_inode; 216 struct inode *inode = d_inode(dentry);
217 int error; 217 int error;
218 218
219 pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid); 219 pr_debug("notify_change(%lu,0x%x)\n", inode->i_ino, attr->ia_valid);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index ec8ca0efb960..181e05b46e72 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -251,7 +251,7 @@ int
251affs_unlink(struct inode *dir, struct dentry *dentry) 251affs_unlink(struct inode *dir, struct dentry *dentry)
252{ 252{
253 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino, 253 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
254 dentry->d_inode->i_ino, dentry); 254 d_inode(dentry)->i_ino, dentry);
255 255
256 return affs_remove_header(dentry); 256 return affs_remove_header(dentry);
257} 257}
@@ -320,7 +320,7 @@ int
320affs_rmdir(struct inode *dir, struct dentry *dentry) 320affs_rmdir(struct inode *dir, struct dentry *dentry)
321{ 321{
322 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino, 322 pr_debug("%s(dir=%lu, %lu \"%pd\")\n", __func__, dir->i_ino,
323 dentry->d_inode->i_ino, dentry); 323 d_inode(dentry)->i_ino, dentry);
324 324
325 return affs_remove_header(dentry); 325 return affs_remove_header(dentry);
326} 326}
@@ -403,7 +403,7 @@ err:
403int 403int
404affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) 404affs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
405{ 405{
406 struct inode *inode = old_dentry->d_inode; 406 struct inode *inode = d_inode(old_dentry);
407 407
408 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino, 408 pr_debug("%s(%lu, %lu, \"%pd\")\n", __func__, inode->i_ino, dir->i_ino,
409 dentry); 409 dentry);
@@ -430,13 +430,13 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
430 return retval; 430 return retval;
431 431
432 /* Unlink destination if it already exists */ 432 /* Unlink destination if it already exists */
433 if (new_dentry->d_inode) { 433 if (d_really_is_positive(new_dentry)) {
434 retval = affs_remove_header(new_dentry); 434 retval = affs_remove_header(new_dentry);
435 if (retval) 435 if (retval)
436 return retval; 436 return retval;
437 } 437 }
438 438
439 bh = affs_bread(sb, old_dentry->d_inode->i_ino); 439 bh = affs_bread(sb, d_inode(old_dentry)->i_ino);
440 if (!bh) 440 if (!bh)
441 return -EIO; 441 return -EIO;
442 442