projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'char-misc-4.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[cascardo/linux.git]
/
fs
/
nfsd
/
nfs4recover.c
diff --git
a/fs/nfsd/nfs4recover.c
b/fs/nfsd/nfs4recover.c
index
1c307f0
..
d88ea7b
100644
(file)
--- a/
fs/nfsd/nfs4recover.c
+++ b/
fs/nfsd/nfs4recover.c
@@
-192,14
+192,14
@@
nfsd4_create_clid_dir(struct nfs4_client *clp)
dir = nn->rec_file->f_path.dentry;
/* lock the parent */
dir = nn->rec_file->f_path.dentry;
/* lock the parent */
- mutex_lock(&d
ir->d_inode
->i_mutex);
+ mutex_lock(&d
_inode(dir)
->i_mutex);
dentry = lookup_one_len(dname, dir, HEXDIR_LEN-1);
if (IS_ERR(dentry)) {
status = PTR_ERR(dentry);
goto out_unlock;
}
dentry = lookup_one_len(dname, dir, HEXDIR_LEN-1);
if (IS_ERR(dentry)) {
status = PTR_ERR(dentry);
goto out_unlock;
}
- if (d
entry->d_inode
)
+ if (d
_really_is_positive(dentry)
)
/*
* In the 4.1 case, where we're called from
* reclaim_complete(), records from the previous reboot
/*
* In the 4.1 case, where we're called from
* reclaim_complete(), records from the previous reboot
@@
-209,11
+209,11
@@
nfsd4_create_clid_dir(struct nfs4_client *clp)
* as well be forgiving and just succeed silently.
*/
goto out_put;
* as well be forgiving and just succeed silently.
*/
goto out_put;
- status = vfs_mkdir(d
ir->d_inode
, dentry, S_IRWXU);
+ status = vfs_mkdir(d
_inode(dir)
, dentry, S_IRWXU);
out_put:
dput(dentry);
out_unlock:
out_put:
dput(dentry);
out_unlock:
- mutex_unlock(&d
ir->d_inode
->i_mutex);
+ mutex_unlock(&d
_inode(dir)
->i_mutex);
if (status == 0) {
if (nn->in_grace) {
crp = nfs4_client_to_reclaim(dname, nn);
if (status == 0) {
if (nn->in_grace) {
crp = nfs4_client_to_reclaim(dname, nn);
@@
-285,7
+285,7
@@
nfsd4_list_rec_dir(recdir_func *f, struct nfsd_net *nn)
}
status = iterate_dir(nn->rec_file, &ctx.ctx);
}
status = iterate_dir(nn->rec_file, &ctx.ctx);
- mutex_lock_nested(&d
ir->d_inode
->i_mutex, I_MUTEX_PARENT);
+ mutex_lock_nested(&d
_inode(dir)
->i_mutex, I_MUTEX_PARENT);
while (!list_empty(&ctx.names)) {
struct name_list *entry;
entry = list_entry(ctx.names.next, struct name_list, list);
while (!list_empty(&ctx.names)) {
struct name_list *entry;
entry = list_entry(ctx.names.next, struct name_list, list);
@@
-302,7
+302,7
@@
nfsd4_list_rec_dir(recdir_func *f, struct nfsd_net *nn)
list_del(&entry->list);
kfree(entry);
}
list_del(&entry->list);
kfree(entry);
}
- mutex_unlock(&d
ir->d_inode
->i_mutex);
+ mutex_unlock(&d
_inode(dir)
->i_mutex);
nfs4_reset_creds(original_cred);
return status;
}
nfs4_reset_creds(original_cred);
return status;
}
@@
-316,20
+316,20
@@
nfsd4_unlink_clid_dir(char *name, int namlen, struct nfsd_net *nn)
dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name);
dir = nn->rec_file->f_path.dentry;
dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name);
dir = nn->rec_file->f_path.dentry;
- mutex_lock_nested(&d
ir->d_inode
->i_mutex, I_MUTEX_PARENT);
+ mutex_lock_nested(&d
_inode(dir)
->i_mutex, I_MUTEX_PARENT);
dentry = lookup_one_len(name, dir, namlen);
if (IS_ERR(dentry)) {
status = PTR_ERR(dentry);
goto out_unlock;
}
status = -ENOENT;
dentry = lookup_one_len(name, dir, namlen);
if (IS_ERR(dentry)) {
status = PTR_ERR(dentry);
goto out_unlock;
}
status = -ENOENT;
- if (
!dentry->d_inode
)
+ if (
d_really_is_negative(dentry)
)
goto out;
goto out;
- status = vfs_rmdir(d
ir->d_inode
, dentry);
+ status = vfs_rmdir(d
_inode(dir)
, dentry);
out:
dput(dentry);
out_unlock:
out:
dput(dentry);
out_unlock:
- mutex_unlock(&d
ir->d_inode
->i_mutex);
+ mutex_unlock(&d
_inode(dir)
->i_mutex);
return status;
}
return status;
}
@@
-385,7
+385,7
@@
purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
if (nfs4_has_reclaimed_state(child->d_name.name, nn))
return 0;
if (nfs4_has_reclaimed_state(child->d_name.name, nn))
return 0;
- status = vfs_rmdir(
parent->d_inode
, child);
+ status = vfs_rmdir(
d_inode(parent)
, child);
if (status)
printk("failed to remove client recovery directory %pd\n",
child);
if (status)
printk("failed to remove client recovery directory %pd\n",
child);