patch-2.4.13 linux/fs/udf/namei.c
Next file: linux/fs/udf/super.c
Previous file: linux/fs/udf/lowlevel.c
Back to the patch index
Back to the overall index
- Lines: 90
- Date:
Thu Oct 11 08:59:24 2001
- Orig file:
v2.4.12/linux/fs/udf/namei.c
- Orig date:
Tue Jul 3 17:08:21 2001
diff -u --recursive --new-file v2.4.12/linux/fs/udf/namei.c linux/fs/udf/namei.c
@@ -835,7 +835,7 @@
static int udf_rmdir(struct inode * dir, struct dentry * dentry)
{
int retval;
- struct inode * inode;
+ struct inode * inode = dentry->d_inode;
struct udf_fileident_bh fibh;
struct FileIdentDesc *fi, cfi;
@@ -844,9 +844,6 @@
if (!fi)
goto out;
- inode = dentry->d_inode;
- DQUOT_INIT(inode);
-
retval = -EIO;
if (udf_get_lb_pblock(dir->i_sb, lelb_to_cpu(cfi.icb.extLocation), 0) != inode->i_ino)
goto end_rmdir;
@@ -881,7 +878,7 @@
static int udf_unlink(struct inode * dir, struct dentry * dentry)
{
int retval;
- struct inode * inode;
+ struct inode * inode = dentry->d_inode;
struct udf_fileident_bh fibh;
struct FileIdentDesc *fi;
struct FileIdentDesc cfi;
@@ -891,9 +888,6 @@
if (!fi)
goto out;
- inode = dentry->d_inode;
- DQUOT_INIT(inode);
-
retval = -EIO;
if (udf_get_lb_pblock(dir->i_sb, lelb_to_cpu(cfi.icb.extLocation), 0) !=
@@ -954,7 +948,7 @@
lb_addr bloc, eloc;
Uint32 elen, extoffset;
- block = udf_new_block(inode,
+ block = udf_new_block(inode->i_sb, inode,
UDF_I_LOCATION(inode).partitionReferenceNum,
UDF_I_LOCATION(inode).logicalBlockNum, &err);
if (!block)
@@ -968,7 +962,6 @@
udf_add_aext(inode, &bloc, &extoffset, eloc, elen, &bh, 0);
udf_release_data(bh);
- inode->i_blocks = inode->i_sb->s_blocksize / 512;
block = udf_get_pblock(inode->i_sb, block,
UDF_I_LOCATION(inode).partitionReferenceNum, 0);
bh = udf_tread(inode->i_sb, block, inode->i_sb->s_blocksize);
@@ -1150,13 +1143,13 @@
static int udf_rename (struct inode * old_dir, struct dentry * old_dentry,
struct inode * new_dir, struct dentry * new_dentry)
{
- struct inode * old_inode, * new_inode;
+ struct inode * old_inode = old_dentry->d_inode;
+ struct inode * new_inode = new_dentry->d_inode;
struct udf_fileident_bh ofibh, nfibh;
struct FileIdentDesc *ofi = NULL, *nfi = NULL, *dir_fi = NULL, ocfi, ncfi;
struct buffer_head *dir_bh = NULL;
int retval = -ENOENT;
- old_inode = old_dentry->d_inode;
if ((ofi = udf_find_entry(old_dir, old_dentry, &ofibh, &ocfi)))
{
if (ofibh.sbh != ofibh.ebh)
@@ -1169,7 +1162,6 @@
goto end_rename;
}
- new_inode = new_dentry->d_inode;
nfi = udf_find_entry(new_dir, new_dentry, &nfibh, &ncfi);
if (nfi)
{
@@ -1179,10 +1171,6 @@
udf_release_data(nfibh.ebh);
udf_release_data(nfibh.sbh);
nfi = NULL;
- }
- else
- {
- DQUOT_INIT(new_inode);
}
}
if (S_ISDIR(old_inode->i_mode))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)