patch-2.3.2 linux/fs/ncpfs/dir.c
Next file: linux/fs/ncpfs/file.c
Previous file: linux/fs/msdos/namei.c
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Fri May 14 12:43:00 1999
- Orig file:
v2.3.1/linux/fs/ncpfs/dir.c
- Orig date:
Fri May 14 18:55:25 1999
diff -u --recursive --new-file v2.3.1/linux/fs/ncpfs/dir.c linux/fs/ncpfs/dir.c
@@ -38,8 +38,7 @@
static int c_seen_eof;
static int c_last_returned_index;
static struct ncp_dirent *c_entry = NULL;
-static int c_lock = 0;
-static DECLARE_WAIT_QUEUE_HEAD(c_wait);
+static DECLARE_MUTEX(c_sem);
static int ncp_read_volume_list(struct ncp_server *, int, int,
struct ncp_dirent *);
@@ -230,15 +229,12 @@
static inline void ncp_lock_dircache(void)
{
- while (c_lock)
- sleep_on(&c_wait);
- c_lock = 1;
+ down(&c_sem);
}
static inline void ncp_unlock_dircache(void)
{
- c_lock = 0;
- wake_up(&c_wait);
+ up(&c_sem);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)