diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 6 | ||||
-rw-r--r-- | fs/nfs/getroot.c | 12 | ||||
-rw-r--r-- | fs/nfs/namespace.c | 16 | ||||
-rw-r--r-- | fs/nfs/unlink.c | 20 |
4 files changed, 27 insertions, 27 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 462a00601737..e0ce56661012 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1813,9 +1813,9 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry) dfprintk(VFS, "NFS: unlink(%s/%ld, %s)\n", dir->i_sb->s_id, dir->i_ino, dentry->d_name.name); - spin_lock(&dentry->d_lock); + seq_spin_lock(&dentry->d_lock); if (dentry->d_count > 1) { - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); /* Start asynchronous writeout of the inode */ write_inode_now(dentry->d_inode, 0); error = nfs_sillyrename(dir, dentry); @@ -1825,7 +1825,7 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry) __d_drop(dentry); need_rehash = 1; } - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); error = nfs_safe_remove(dentry); if (!error || error == -ENOENT) { nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index dcb61548887f..02ecd4dd15cd 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c @@ -64,9 +64,9 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i * Oops, since the test for IS_ROOT() will fail. */ spin_lock(&sb->s_root->d_inode->i_lock); - spin_lock(&sb->s_root->d_lock); + seq_spin_lock(&sb->s_root->d_lock); list_del_init(&sb->s_root->d_alias); - spin_unlock(&sb->s_root->d_lock); + seq_spin_unlock(&sb->s_root->d_lock); spin_unlock(&sb->s_root->d_inode->i_lock); } return 0; @@ -126,12 +126,12 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh, } security_d_instantiate(ret, inode); - spin_lock(&ret->d_lock); + seq_spin_lock(&ret->d_lock); if (IS_ROOT(ret) && !(ret->d_flags & DCACHE_NFSFS_RENAMED)) { ret->d_fsdata = name; name = NULL; } - spin_unlock(&ret->d_lock); + seq_spin_unlock(&ret->d_lock); out: if (name) kfree(name); @@ -250,12 +250,12 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh, } security_d_instantiate(ret, inode); - spin_lock(&ret->d_lock); + seq_spin_lock(&ret->d_lock); if (IS_ROOT(ret) && !(ret->d_flags & DCACHE_NFSFS_RENAMED)) { ret->d_fsdata = name; name = NULL; } - spin_unlock(&ret->d_lock); + seq_spin_unlock(&ret->d_lock); out: if (name) kfree(name); diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c index 1f063bacd285..4b3ffaa454bb 100644 --- a/fs/nfs/namespace.c +++ b/fs/nfs/namespace.c @@ -60,7 +60,7 @@ rename_retry: seq = read_seqbegin(&rename_lock); rcu_read_lock(); while (1) { - spin_lock(&dentry->d_lock); + seq_spin_lock(&dentry->d_lock); if (IS_ROOT(dentry)) break; namelen = dentry->d_name.len; @@ -70,17 +70,17 @@ rename_retry: end -= namelen; memcpy(end, dentry->d_name.name, namelen); *--end = '/'; - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); dentry = dentry->d_parent; } if (read_seqretry(&rename_lock, seq)) { - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); goto rename_retry; } if (*end != '/') { if (--buflen < 0) { - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); goto Elong; } @@ -89,7 +89,7 @@ rename_retry: *p = end; base = dentry->d_fsdata; if (!base) { - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); WARN_ON(1); return end; @@ -100,17 +100,17 @@ rename_retry: namelen--; buflen -= namelen; if (buflen < 0) { - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); goto Elong; } end -= namelen; memcpy(end, base, namelen); - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); return end; Elong_unlock: - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); rcu_read_unlock(); if (read_seqretry(&rename_lock, seq)) goto rename_retry; diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c index 8d6864c2a5fa..5d2740d4faea 100644 --- a/fs/nfs/unlink.c +++ b/fs/nfs/unlink.c @@ -155,7 +155,7 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n * the sillyrename information to the aliased dentry. */ nfs_free_dname(data); - spin_lock(&alias->d_lock); + seq_spin_lock(&alias->d_lock); if (alias->d_inode != NULL && !(alias->d_flags & DCACHE_NFSFS_RENAMED)) { devname_garbage = alias->d_fsdata; @@ -163,7 +163,7 @@ static int nfs_do_call_unlink(struct dentry *parent, struct inode *dir, struct n alias->d_flags |= DCACHE_NFSFS_RENAMED; ret = 1; } - spin_unlock(&alias->d_lock); + seq_spin_unlock(&alias->d_lock); nfs_dec_sillycount(dir); dput(alias); /* @@ -275,13 +275,13 @@ nfs_async_unlink(struct inode *dir, struct dentry *dentry) data->res.dir_attr = &data->dir_attr; status = -EBUSY; - spin_lock(&dentry->d_lock); + seq_spin_lock(&dentry->d_lock); if (dentry->d_flags & DCACHE_NFSFS_RENAMED) goto out_unlock; dentry->d_flags |= DCACHE_NFSFS_RENAMED; devname_garbage = dentry->d_fsdata; dentry->d_fsdata = data; - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); /* * If we'd displaced old cached devname, free it. At that * point dentry is definitely not a root, so we won't need @@ -291,7 +291,7 @@ nfs_async_unlink(struct inode *dir, struct dentry *dentry) kfree(devname_garbage); return 0; out_unlock: - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); put_rpccred(data->cred); out_free: kfree(data); @@ -313,13 +313,13 @@ nfs_complete_unlink(struct dentry *dentry, struct inode *inode) { struct nfs_unlinkdata *data = NULL; - spin_lock(&dentry->d_lock); + seq_spin_lock(&dentry->d_lock); if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { dentry->d_flags &= ~DCACHE_NFSFS_RENAMED; data = dentry->d_fsdata; dentry->d_fsdata = NULL; } - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); if (data != NULL && (NFS_STALE(inode) || !nfs_call_unlink(dentry, data))) nfs_free_unlinkdata(data); @@ -329,17 +329,17 @@ nfs_complete_unlink(struct dentry *dentry, struct inode *inode) static void nfs_cancel_async_unlink(struct dentry *dentry) { - spin_lock(&dentry->d_lock); + seq_spin_lock(&dentry->d_lock); if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { struct nfs_unlinkdata *data = dentry->d_fsdata; dentry->d_flags &= ~DCACHE_NFSFS_RENAMED; dentry->d_fsdata = NULL; - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); nfs_free_unlinkdata(data); return; } - spin_unlock(&dentry->d_lock); + seq_spin_unlock(&dentry->d_lock); } struct nfs_renamedata { |