summaryrefslogtreecommitdiffstats
path: root/arch/sparc64/solaris/fs.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-04-19 04:00:00 +0000
commit46e045034336a2cc90c1798cd7cc07af744ddfd6 (patch)
tree3b9b51fc482e729f663d25333e77fbed9aaa939a /arch/sparc64/solaris/fs.c
parent31dc59d503a02e84c4de98826452acaeb56dc15a (diff)
Merge with Linux 2.3.99-pre4.
Diffstat (limited to 'arch/sparc64/solaris/fs.c')
-rw-r--r--arch/sparc64/solaris/fs.c41
1 files changed, 12 insertions, 29 deletions
diff --git a/arch/sparc64/solaris/fs.c b/arch/sparc64/solaris/fs.c
index 4adaf4077..2c17d664d 100644
--- a/arch/sparc64/solaris/fs.c
+++ b/arch/sparc64/solaris/fs.c
@@ -495,26 +495,18 @@ asmlinkage int solaris_statvfs(u32 path, u32 buf)
asmlinkage int solaris_fstatvfs(unsigned int fd, u32 buf)
{
- struct inode * inode;
- struct dentry * dentry;
struct file * file;
int error;
- lock_kernel();
error = -EBADF;
file = fget(fd);
- if (!file)
- goto out;
-
- if (!(dentry = file->f_dentry))
- error = -ENOENT;
- else if (!(inode = dentry->d_inode))
- error = -ENOENT;
- else
- error = report_statvfs(inode, buf);
- fput(file);
+ if (file) {
+ lock_kernel();
+ error = report_statvfs(file->f_dentry->d_inode, buf);
+ unlock_kernel();
+ fput(file);
+ }
out:
- unlock_kernel();
return error;
}
@@ -538,26 +530,17 @@ asmlinkage int solaris_statvfs64(u32 path, u32 buf)
asmlinkage int solaris_fstatvfs64(unsigned int fd, u32 buf)
{
- struct inode * inode;
- struct dentry * dentry;
struct file * file;
int error;
- lock_kernel();
error = -EBADF;
file = fget(fd);
- if (!file)
- goto out;
-
- if (!(dentry = file->f_dentry))
- error = -ENOENT;
- else if (!(inode = dentry->d_inode))
- error = -ENOENT;
- else
- error = report_statvfs64(inode, buf);
- fput(file);
-out:
- unlock_kernel();
+ if (file) {
+ lock_kernel();
+ error = report_statvfs64(file->f_dentry->d_inode, buf);
+ unlock_kernel();
+ fput(file);
+ }
return error;
}