aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
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 /net/sunrpc
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 'net/sunrpc')
-rw-r--r--net/sunrpc/rpc_pipe.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 2d12b76b5a64..d81186d34558 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -94,7 +94,7 @@ rpc_timeout_upcall_queue(struct work_struct *work)
94 } 94 }
95 dentry = dget(pipe->dentry); 95 dentry = dget(pipe->dentry);
96 spin_unlock(&pipe->lock); 96 spin_unlock(&pipe->lock);
97 rpc_purge_list(dentry ? &RPC_I(dentry->d_inode)->waitq : NULL, 97 rpc_purge_list(dentry ? &RPC_I(d_inode(dentry))->waitq : NULL,
98 &free_list, destroy_msg, -ETIMEDOUT); 98 &free_list, destroy_msg, -ETIMEDOUT);
99 dput(dentry); 99 dput(dentry);
100} 100}
@@ -152,7 +152,7 @@ rpc_queue_upcall(struct rpc_pipe *pipe, struct rpc_pipe_msg *msg)
152 dentry = dget(pipe->dentry); 152 dentry = dget(pipe->dentry);
153 spin_unlock(&pipe->lock); 153 spin_unlock(&pipe->lock);
154 if (dentry) { 154 if (dentry) {
155 wake_up(&RPC_I(dentry->d_inode)->waitq); 155 wake_up(&RPC_I(d_inode(dentry))->waitq);
156 dput(dentry); 156 dput(dentry);
157 } 157 }
158 return res; 158 return res;
@@ -591,7 +591,7 @@ static int __rpc_mkpipe_dentry(struct inode *dir, struct dentry *dentry,
591 err = __rpc_create_common(dir, dentry, S_IFIFO | mode, i_fop, private); 591 err = __rpc_create_common(dir, dentry, S_IFIFO | mode, i_fop, private);
592 if (err) 592 if (err)
593 return err; 593 return err;
594 rpci = RPC_I(dentry->d_inode); 594 rpci = RPC_I(d_inode(dentry));
595 rpci->private = private; 595 rpci->private = private;
596 rpci->pipe = pipe; 596 rpci->pipe = pipe;
597 fsnotify_create(dir, dentry); 597 fsnotify_create(dir, dentry);
@@ -616,7 +616,7 @@ int rpc_rmdir(struct dentry *dentry)
616 int error; 616 int error;
617 617
618 parent = dget_parent(dentry); 618 parent = dget_parent(dentry);
619 dir = parent->d_inode; 619 dir = d_inode(parent);
620 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); 620 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
621 error = __rpc_rmdir(dir, dentry); 621 error = __rpc_rmdir(dir, dentry);
622 mutex_unlock(&dir->i_mutex); 622 mutex_unlock(&dir->i_mutex);
@@ -638,7 +638,7 @@ static int __rpc_unlink(struct inode *dir, struct dentry *dentry)
638 638
639static int __rpc_rmpipe(struct inode *dir, struct dentry *dentry) 639static int __rpc_rmpipe(struct inode *dir, struct dentry *dentry)
640{ 640{
641 struct inode *inode = dentry->d_inode; 641 struct inode *inode = d_inode(dentry);
642 642
643 rpc_close_pipes(inode); 643 rpc_close_pipes(inode);
644 return __rpc_unlink(dir, dentry); 644 return __rpc_unlink(dir, dentry);
@@ -654,7 +654,7 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
654 if (!dentry) 654 if (!dentry)
655 return ERR_PTR(-ENOMEM); 655 return ERR_PTR(-ENOMEM);
656 } 656 }
657 if (dentry->d_inode == NULL) 657 if (d_really_is_negative(dentry))
658 return dentry; 658 return dentry;
659 dput(dentry); 659 dput(dentry);
660 return ERR_PTR(-EEXIST); 660 return ERR_PTR(-EEXIST);
@@ -667,7 +667,7 @@ static void __rpc_depopulate(struct dentry *parent,
667 const struct rpc_filelist *files, 667 const struct rpc_filelist *files,
668 int start, int eof) 668 int start, int eof)
669{ 669{
670 struct inode *dir = parent->d_inode; 670 struct inode *dir = d_inode(parent);
671 struct dentry *dentry; 671 struct dentry *dentry;
672 struct qstr name; 672 struct qstr name;
673 int i; 673 int i;
@@ -679,9 +679,9 @@ static void __rpc_depopulate(struct dentry *parent,
679 679
680 if (dentry == NULL) 680 if (dentry == NULL)
681 continue; 681 continue;
682 if (dentry->d_inode == NULL) 682 if (d_really_is_negative(dentry))
683 goto next; 683 goto next;
684 switch (dentry->d_inode->i_mode & S_IFMT) { 684 switch (d_inode(dentry)->i_mode & S_IFMT) {
685 default: 685 default:
686 BUG(); 686 BUG();
687 case S_IFREG: 687 case S_IFREG:
@@ -699,7 +699,7 @@ static void rpc_depopulate(struct dentry *parent,
699 const struct rpc_filelist *files, 699 const struct rpc_filelist *files,
700 int start, int eof) 700 int start, int eof)
701{ 701{
702 struct inode *dir = parent->d_inode; 702 struct inode *dir = d_inode(parent);
703 703
704 mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD); 704 mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD);
705 __rpc_depopulate(parent, files, start, eof); 705 __rpc_depopulate(parent, files, start, eof);
@@ -711,7 +711,7 @@ static int rpc_populate(struct dentry *parent,
711 int start, int eof, 711 int start, int eof,
712 void *private) 712 void *private)
713{ 713{
714 struct inode *dir = parent->d_inode; 714 struct inode *dir = d_inode(parent);
715 struct dentry *dentry; 715 struct dentry *dentry;
716 int i, err; 716 int i, err;
717 717
@@ -754,7 +754,7 @@ static struct dentry *rpc_mkdir_populate(struct dentry *parent,
754 int (*populate)(struct dentry *, void *), void *args_populate) 754 int (*populate)(struct dentry *, void *), void *args_populate)
755{ 755{
756 struct dentry *dentry; 756 struct dentry *dentry;
757 struct inode *dir = parent->d_inode; 757 struct inode *dir = d_inode(parent);
758 int error; 758 int error;
759 759
760 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); 760 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
@@ -787,7 +787,7 @@ static int rpc_rmdir_depopulate(struct dentry *dentry,
787 int error; 787 int error;
788 788
789 parent = dget_parent(dentry); 789 parent = dget_parent(dentry);
790 dir = parent->d_inode; 790 dir = d_inode(parent);
791 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); 791 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
792 if (depopulate != NULL) 792 if (depopulate != NULL)
793 depopulate(dentry); 793 depopulate(dentry);
@@ -819,7 +819,7 @@ struct dentry *rpc_mkpipe_dentry(struct dentry *parent, const char *name,
819 void *private, struct rpc_pipe *pipe) 819 void *private, struct rpc_pipe *pipe)
820{ 820{
821 struct dentry *dentry; 821 struct dentry *dentry;
822 struct inode *dir = parent->d_inode; 822 struct inode *dir = d_inode(parent);
823 umode_t umode = S_IFIFO | S_IRUSR | S_IWUSR; 823 umode_t umode = S_IFIFO | S_IRUSR | S_IWUSR;
824 int err; 824 int err;
825 825
@@ -864,7 +864,7 @@ rpc_unlink(struct dentry *dentry)
864 int error = 0; 864 int error = 0;
865 865
866 parent = dget_parent(dentry); 866 parent = dget_parent(dentry);
867 dir = parent->d_inode; 867 dir = d_inode(parent);
868 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); 868 mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT);
869 error = __rpc_rmpipe(dir, dentry); 869 error = __rpc_rmpipe(dir, dentry);
870 mutex_unlock(&dir->i_mutex); 870 mutex_unlock(&dir->i_mutex);
@@ -1375,7 +1375,7 @@ rpc_gssd_dummy_depopulate(struct dentry *pipe_dentry)
1375 struct dentry *clnt_dir = pipe_dentry->d_parent; 1375 struct dentry *clnt_dir = pipe_dentry->d_parent;
1376 struct dentry *gssd_dir = clnt_dir->d_parent; 1376 struct dentry *gssd_dir = clnt_dir->d_parent;
1377 1377
1378 __rpc_rmpipe(clnt_dir->d_inode, pipe_dentry); 1378 __rpc_rmpipe(d_inode(clnt_dir), pipe_dentry);
1379 __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1); 1379 __rpc_depopulate(clnt_dir, gssd_dummy_info_file, 0, 1);
1380 __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1); 1380 __rpc_depopulate(gssd_dir, gssd_dummy_clnt_dir, 0, 1);
1381 dput(pipe_dentry); 1381 dput(pipe_dentry);