patch-2.0.30 linux/fs/namei.c
Next file: linux/fs/nfs/dir.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Mar 17 17:28:54 1997
- Orig file:
v2.0.29/linux/fs/namei.c
- Orig date:
Sat Nov 30 02:23:00 1996
diff -u --recursive --new-file v2.0.29/linux/fs/namei.c linux/fs/namei.c
@@ -639,7 +639,10 @@
}
if (dir->i_sb && dir->i_sb->dq_op)
dir->i_sb->dq_op->initialize(dir, -1);
- return dir->i_op->rmdir(dir,basename,namelen);
+ down(&dir->i_sem);
+ error = dir->i_op->rmdir(dir,basename,namelen);
+ up(&dir->i_sem);
+ return error;
}
asmlinkage int sys_rmdir(const char * pathname)
@@ -690,7 +693,10 @@
}
if (dir->i_sb && dir->i_sb->dq_op)
dir->i_sb->dq_op->initialize(dir, -1);
- return dir->i_op->unlink(dir,basename,namelen);
+ down(&dir->i_sem);
+ error = dir->i_op->unlink(dir,basename,namelen);
+ up(&dir->i_sem);
+ return error;
}
asmlinkage int sys_unlink(const char * pathname)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov