summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-12 23:15:27 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-12 23:15:27 +0000
commitae38fd1e4c98588314a42097c5a5e77dcef23561 (patch)
treef9f10c203bb9e5fbad4810d1f8774c08dfad20ff /arch/alpha
parent466a823d79f41d0713b272e48fd73e494b0588e0 (diff)
Merge with Linux 2.3.50.
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/Makefile2
-rw-r--r--arch/alpha/kernel/osf_sys.c18
2 files changed, 4 insertions, 16 deletions
diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index 309a308a4..6c538f4ba 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -132,7 +132,7 @@ asm_offsets: check_asm
./check_asm > $(TOPDIR)/include/asm-alpha/asm_offsets.h
check_asm: check_asm.c
- gcc -o $@ $< -I$(TOPDIR)/include -D__KERNEL__ -ffixed-8
+ $(HOSTCC) -o $@ $< $(CPPFLAGS) -ffixed-8
clean::
rm -f check_asm
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index d9af71414..6a2ff8a9b 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -135,10 +135,8 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent *dirent,
{
int error;
struct file *file;
- struct inode *inode;
struct osf_dirent_callback buf;
- lock_kernel();
error = -EBADF;
file = fget(fd);
if (!file)
@@ -149,18 +147,8 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent *dirent,
buf.count = count;
buf.error = 0;
- error = -ENOTDIR;
- if (!file->f_op || !file->f_op->readdir)
- goto out_putf;
-
- /*
- * Get the inode's semaphore to prevent changes
- * to the directory while we read it.
- */
- inode = file->f_dentry->d_inode;
- down(&inode->i_sem);
- error = file->f_op->readdir(file, &buf, osf_filldir);
- up(&inode->i_sem);
+ lock_kernel();
+ error = vfs_readdir(file, osf_filldir, &buf);
if (error < 0)
goto out_putf;
@@ -169,9 +157,9 @@ asmlinkage int osf_getdirentries(unsigned int fd, struct osf_dirent *dirent,
error = count - buf.count;
out_putf:
+ unlock_kernel();
fput(file);
out:
- unlock_kernel();
return error;
}