patch-2.1.62 linux/fs/dquot.c
Next file: linux/fs/nfs/dir.c
Previous file: linux/drivers/scsi/sr_vendor.c
Back to the patch index
Back to the overall index
- Lines: 56
- Date:
Sat Nov 1 10:59:56 1997
- Orig file:
v2.1.61/linux/fs/dquot.c
- Orig date:
Thu Sep 11 09:02:23 1997
diff -u --recursive --new-file v2.1.61/linux/fs/dquot.c linux/fs/dquot.c
@@ -223,25 +223,17 @@
short type = dquot->dq_type;
struct file *filp = dquot->dq_mnt->mnt_quotas[type];
unsigned long fs;
+ loff_t offset;
if (!(dquot->dq_flags & DQ_MOD) || (filp == (struct file *)NULL))
return;
lock_dquot(dquot);
down(&dquot->dq_mnt->mnt_sem);
- if (filp->f_op->llseek) {
- if (filp->f_op->llseek(filp->f_dentry->d_inode, filp,
- dqoff(dquot->dq_id), 0) != dqoff(dquot->dq_id)) {
- up(&dquot->dq_mnt->mnt_sem);
- unlock_dquot(dquot);
- return;
- }
- } else
- filp->f_pos = dqoff(dquot->dq_id);
+ offset = dqoff(dquot->dq_id);
fs = get_fs();
set_fs(KERNEL_DS);
- if (filp->f_op->write(filp->f_dentry->d_inode, filp,
- (char *)&dquot->dq_dqb, sizeof(struct dqblk)) == sizeof(struct dqblk))
+ if (filp->f_op->write(filp, (char *)&dquot->dq_dqb, sizeof(struct dqblk), &offset) == sizeof(struct dqblk))
dquot->dq_flags &= ~DQ_MOD;
up(&dquot->dq_mnt->mnt_sem);
@@ -255,23 +247,16 @@
short type = dquot->dq_type;
struct file *filp = dquot->dq_mnt->mnt_quotas[type];
unsigned long fs;
+ loff_t offset;
if (filp == (struct file *)NULL)
return;
lock_dquot(dquot);
down(&dquot->dq_mnt->mnt_sem);
- if (filp->f_op->llseek) {
- if (filp->f_op->llseek(filp->f_dentry->d_inode, filp,
- dqoff(dquot->dq_id), 0) != dqoff(dquot->dq_id)) {
- up(&dquot->dq_mnt->mnt_sem);
- unlock_dquot(dquot);
- return;
- }
- } else
- filp->f_pos = dqoff(dquot->dq_id);
+ offset = dqoff(dquot->dq_id);
fs = get_fs();
set_fs(KERNEL_DS);
- filp->f_op->read(filp->f_dentry->d_inode, filp, (char *)&dquot->dq_dqb, sizeof(struct dqblk));
+ filp->f_op->read(filp, (char *)&dquot->dq_dqb, sizeof(struct dqblk), &offset);
up(&dquot->dq_mnt->mnt_sem);
set_fs(fs);
if (dquot->dq_bhardlimit == 0 && dquot->dq_bsoftlimit == 0 &&
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov