aboutsummaryrefslogtreecommitdiffstats
path: root/fs/logfs/dir.c
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/logfs/dir.c
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/logfs/dir.c')
-rw-r--r--fs/logfs/dir.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c
index 6bdc347008f5..4cf38f118549 100644
--- a/fs/logfs/dir.c
+++ b/fs/logfs/dir.c
@@ -213,7 +213,7 @@ static void abort_transaction(struct inode *inode, struct logfs_transaction *ta)
213static int logfs_unlink(struct inode *dir, struct dentry *dentry) 213static int logfs_unlink(struct inode *dir, struct dentry *dentry)
214{ 214{
215 struct logfs_super *super = logfs_super(dir->i_sb); 215 struct logfs_super *super = logfs_super(dir->i_sb);
216 struct inode *inode = dentry->d_inode; 216 struct inode *inode = d_inode(dentry);
217 struct logfs_transaction *ta; 217 struct logfs_transaction *ta;
218 struct page *page; 218 struct page *page;
219 pgoff_t index; 219 pgoff_t index;
@@ -271,7 +271,7 @@ static inline int logfs_empty_dir(struct inode *dir)
271 271
272static int logfs_rmdir(struct inode *dir, struct dentry *dentry) 272static int logfs_rmdir(struct inode *dir, struct dentry *dentry)
273{ 273{
274 struct inode *inode = dentry->d_inode; 274 struct inode *inode = d_inode(dentry);
275 275
276 if (!logfs_empty_dir(inode)) 276 if (!logfs_empty_dir(inode))
277 return -ENOTEMPTY; 277 return -ENOTEMPTY;
@@ -537,7 +537,7 @@ static int logfs_symlink(struct inode *dir, struct dentry *dentry,
537static int logfs_link(struct dentry *old_dentry, struct inode *dir, 537static int logfs_link(struct dentry *old_dentry, struct inode *dir,
538 struct dentry *dentry) 538 struct dentry *dentry)
539{ 539{
540 struct inode *inode = old_dentry->d_inode; 540 struct inode *inode = d_inode(old_dentry);
541 541
542 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 542 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
543 ihold(inode); 543 ihold(inode);
@@ -607,7 +607,7 @@ static int logfs_rename_cross(struct inode *old_dir, struct dentry *old_dentry,
607 /* 2. write target dd */ 607 /* 2. write target dd */
608 mutex_lock(&super->s_dirop_mutex); 608 mutex_lock(&super->s_dirop_mutex);
609 logfs_add_transaction(new_dir, ta); 609 logfs_add_transaction(new_dir, ta);
610 err = logfs_write_dir(new_dir, new_dentry, old_dentry->d_inode); 610 err = logfs_write_dir(new_dir, new_dentry, d_inode(old_dentry));
611 if (!err) 611 if (!err)
612 err = write_inode(new_dir); 612 err = write_inode(new_dir);
613 613
@@ -658,8 +658,8 @@ static int logfs_rename_target(struct inode *old_dir, struct dentry *old_dentry,
658 struct inode *new_dir, struct dentry *new_dentry) 658 struct inode *new_dir, struct dentry *new_dentry)
659{ 659{
660 struct logfs_super *super = logfs_super(old_dir->i_sb); 660 struct logfs_super *super = logfs_super(old_dir->i_sb);
661 struct inode *old_inode = old_dentry->d_inode; 661 struct inode *old_inode = d_inode(old_dentry);
662 struct inode *new_inode = new_dentry->d_inode; 662 struct inode *new_inode = d_inode(new_dentry);
663 int isdir = S_ISDIR(old_inode->i_mode); 663 int isdir = S_ISDIR(old_inode->i_mode);
664 struct logfs_disk_dentry dd; 664 struct logfs_disk_dentry dd;
665 struct logfs_transaction *ta; 665 struct logfs_transaction *ta;
@@ -719,7 +719,7 @@ out:
719static int logfs_rename(struct inode *old_dir, struct dentry *old_dentry, 719static int logfs_rename(struct inode *old_dir, struct dentry *old_dentry,
720 struct inode *new_dir, struct dentry *new_dentry) 720 struct inode *new_dir, struct dentry *new_dentry)
721{ 721{
722 if (new_dentry->d_inode) 722 if (d_really_is_positive(new_dentry))
723 return logfs_rename_target(old_dir, old_dentry, 723 return logfs_rename_target(old_dir, old_dentry,
724 new_dir, new_dentry); 724 new_dir, new_dentry);
725 return logfs_rename_cross(old_dir, old_dentry, new_dir, new_dentry); 725 return logfs_rename_cross(old_dir, old_dentry, new_dir, new_dentry);