patch-2.1.45 linux/fs/nfsd/vfs.c
Next file: linux/fs/open.c
Previous file: linux/fs/nfsd/export.c
Back to the patch index
Back to the overall index
- Lines: 138
- Date:
Wed Jul 16 19:22:51 1997
- Orig file:
v2.1.44/linux/fs/nfsd/vfs.c
- Orig date:
Mon Jun 16 16:35:58 1997
diff -u --recursive --new-file v2.1.44/linux/fs/nfsd/vfs.c linux/fs/nfsd/vfs.c
@@ -120,13 +120,13 @@
dotdot = (len == 2 && name[0] == '.' && name[1] == '.');
if (dotdot) {
if (dirp == current->fs->root) {
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
*resfh = *fhp;
return 0;
}
if (dirp->i_dev == exp->ex_dev && dirp->i_ino == exp->ex_ino) {
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
*resfh = *fhp;
return 0;
}
@@ -144,12 +144,12 @@
if (perm != 0)
return perm;
if (!len) {
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
*resfh = *fhp;
return 0;
}
- atomic_inc(&dirp->i_count); /* lookup eats the dirp inode */
+ dirp->i_count++; /* lookup eats the dirp inode */
err = dirp->i_op->lookup(dirp, name, len, &inode);
if (err)
@@ -162,7 +162,7 @@
if (!dotdot && (sb = inode->i_sb) && (inode == sb->s_mounted)) {
iput(inode);
inode = sb->s_covered;
- atomic_inc(&inode->i_count);
+ inode->i_count++;
}
fh_compose(resfh, exp, inode);
@@ -291,7 +291,7 @@
}
}
- atomic_inc(&inode->i_count);
+ inode->i_count++;
return 0;
}
@@ -304,7 +304,7 @@
struct inode *inode;
inode = filp->f_inode;
- if (!atomic_read(&inode->i_count))
+ if (!inode->i_count)
printk(KERN_WARNING "nfsd: inode count == 0!\n");
if (filp->f_op && filp->f_op->release)
filp->f_op->release(inode, filp);
@@ -533,7 +533,7 @@
fh_lock(fhp); /* lock directory */
dirp = fhp->fh_inode;
- atomic_inc(&dirp->i_count); /* dirop eats the inode */
+ dirp->i_count++; /* dirop eats the inode */
switch (type) {
case S_IFREG:
@@ -568,7 +568,7 @@
* If the VFS call doesn't return the inode, look it up now.
*/
if (inode == NULL) {
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
err = dirp->i_op->lookup(dirp, fname, flen, &inode);
if (err < 0)
return -nfserrno(err); /* Huh?! */
@@ -643,7 +643,7 @@
if (!inode->i_op || !inode->i_op->readlink)
return nfserr_io;
- atomic_inc(&inode->i_count);
+ inode->i_count++;
oldfs = get_fs(); set_fs(KERNEL_DS);
err = inode->i_op->readlink(inode, buf, *lenp);
set_fs(oldfs);
@@ -680,7 +680,7 @@
return nfserr_perm;
fh_lock(fhp); /* lock inode */
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
err = dirp->i_op->symlink(dirp, fname, flen, path);
fh_unlock(fhp); /* unlock inode */
@@ -693,7 +693,7 @@
/*
* Okay, now look up the inode of the new symlink.
*/
- atomic_inc(&dirp->i_count); /* lookup eats the dirp inode */
+ dirp->i_count++; /* lookup eats the dirp inode */
err = dirp->i_op->lookup(dirp, fname, flen, &inode);
if (err)
return nfserrno(-err);
@@ -730,7 +730,7 @@
return nfserr_perm;
fh_lock(ffhp); /* lock directory inode */
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
err = dirp->i_op->link(dest, dirp, fname, len);
fh_unlock(ffhp); /* unlock inode */
@@ -770,8 +770,8 @@
return nfserr_perm;
fh_lock(tfhp); /* lock destination directory */
- atomic_inc(&tdir->i_count);
- atomic_inc(&fdir->i_count);
+ tdir->i_count++;
+ fdir->i_count++;
err = fdir->i_op->rename(fdir, fname, flen, tdir, tname, tlen);
fh_unlock(tfhp); /* unlock inode */
@@ -805,12 +805,12 @@
if (type == S_IFDIR) {
if (!dirp->i_op || !dirp->i_op->rmdir)
return nfserr_notdir;
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
err = dirp->i_op->rmdir(dirp, fname, flen);
} else { /* other than S_IFDIR */
if (!dirp->i_op || !dirp->i_op->unlink)
return nfserr_perm;
- atomic_inc(&dirp->i_count);
+ dirp->i_count++;
err = dirp->i_op->unlink(dirp, fname, flen);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov