diff options
Diffstat (limited to 'net/sunrpc/rpc_pipe.c')
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 6db6006616c6..dc6cb93c8830 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -515,7 +515,7 @@ rpc_depopulate(struct dentry *parent) | |||
515 | struct dentry *dentry, *dvec[10]; | 515 | struct dentry *dentry, *dvec[10]; |
516 | int n = 0; | 516 | int n = 0; |
517 | 517 | ||
518 | mutex_lock(&dir->i_mutex); | 518 | mutex_lock_nested(&dir->i_mutex, I_MUTEX_CHILD); |
519 | repeat: | 519 | repeat: |
520 | spin_lock(&dcache_lock); | 520 | spin_lock(&dcache_lock); |
521 | list_for_each_safe(pos, next, &parent->d_subdirs) { | 521 | list_for_each_safe(pos, next, &parent->d_subdirs) { |
@@ -631,7 +631,7 @@ rpc_lookup_negative(char *path, struct nameidata *nd) | |||
631 | if ((error = rpc_lookup_parent(path, nd)) != 0) | 631 | if ((error = rpc_lookup_parent(path, nd)) != 0) |
632 | return ERR_PTR(error); | 632 | return ERR_PTR(error); |
633 | dir = nd->dentry->d_inode; | 633 | dir = nd->dentry->d_inode; |
634 | mutex_lock(&dir->i_mutex); | 634 | mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); |
635 | dentry = lookup_one_len(nd->last.name, nd->dentry, nd->last.len); | 635 | dentry = lookup_one_len(nd->last.name, nd->dentry, nd->last.len); |
636 | if (IS_ERR(dentry)) | 636 | if (IS_ERR(dentry)) |
637 | goto out_err; | 637 | goto out_err; |
@@ -693,7 +693,7 @@ rpc_rmdir(char *path) | |||
693 | if ((error = rpc_lookup_parent(path, &nd)) != 0) | 693 | if ((error = rpc_lookup_parent(path, &nd)) != 0) |
694 | return error; | 694 | return error; |
695 | dir = nd.dentry->d_inode; | 695 | dir = nd.dentry->d_inode; |
696 | mutex_lock(&dir->i_mutex); | 696 | mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); |
697 | dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); | 697 | dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); |
698 | if (IS_ERR(dentry)) { | 698 | if (IS_ERR(dentry)) { |
699 | error = PTR_ERR(dentry); | 699 | error = PTR_ERR(dentry); |
@@ -754,7 +754,7 @@ rpc_unlink(char *path) | |||
754 | if ((error = rpc_lookup_parent(path, &nd)) != 0) | 754 | if ((error = rpc_lookup_parent(path, &nd)) != 0) |
755 | return error; | 755 | return error; |
756 | dir = nd.dentry->d_inode; | 756 | dir = nd.dentry->d_inode; |
757 | mutex_lock(&dir->i_mutex); | 757 | mutex_lock_nested(&dir->i_mutex, I_MUTEX_PARENT); |
758 | dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); | 758 | dentry = lookup_one_len(nd.last.name, nd.dentry, nd.last.len); |
759 | if (IS_ERR(dentry)) { | 759 | if (IS_ERR(dentry)) { |
760 | error = PTR_ERR(dentry); | 760 | error = PTR_ERR(dentry); |