patch-2.1.45 linux/fs/msdos/namei.c
Next file: linux/fs/namei.c
Previous file: linux/fs/minix/truncate.c
Back to the patch index
Back to the overall index
- Lines: 131
- Date:
Wed Jul 16 19:22:51 1997
- Orig file:
v2.1.44/linux/fs/msdos/namei.c
- Orig date:
Mon Jun 16 16:35:57 1997
diff -u --recursive --new-file v2.1.44/linux/fs/msdos/namei.c linux/fs/msdos/namei.c
@@ -280,7 +280,7 @@
* XXX all times should be set by caller upon successful completion.
*/
dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- dir->i_dirt = 1;
+ mark_inode_dirty(dir);
memcpy(de->name,name,MSDOS_NAME);
memset(de->unused, 0, sizeof(de->unused));
de->attr = is_dir ? ATTR_DIR : ATTR_ARCH;
@@ -295,7 +295,7 @@
if (!*result) return -EIO;
(*result)->i_mtime = (*result)->i_atime = (*result)->i_ctime =
CURRENT_TIME;
- (*result)->i_dirt = 1;
+ mark_inode_dirty(*result);
return 0;
}
@@ -369,7 +369,7 @@
struct buffer_head *bh;
struct msdos_dir_entry *de;
- if (atomic_read(&dir->i_count) > 1)
+ if (dir->i_count > 1)
return -EBUSY;
if (MSDOS_I(dir)->i_start) { /* may be zero in mkdir */
pos = 0;
@@ -415,7 +415,8 @@
inode->i_nlink = 0;
inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
dir->i_nlink--;
- inode->i_dirt = dir->i_dirt = 1;
+ mark_inode_dirty(inode);
+ mark_inode_dirty(dir);
de->name[0] = DELETED_FLAG;
fat_mark_buffer_dirty(sb, bh, 1);
res = 0;
@@ -465,7 +466,7 @@
dot->i_size = inode->i_size; /* doesn't grow in the 2nd create_entry */
MSDOS_I(dot)->i_start = MSDOS_I(inode)->i_start;
dot->i_nlink = inode->i_nlink;
- dot->i_dirt = 1;
+ mark_inode_dirty(dot);
iput(dot);
if ((res = msdos_create_entry(inode,MSDOS_DOTDOT,2,1,0,&dot)) < 0)
goto mkdir_error;
@@ -473,7 +474,7 @@
dot->i_size = dir->i_size;
MSDOS_I(dot)->i_start = MSDOS_I(dir)->i_start;
dot->i_nlink = dir->i_nlink;
- dot->i_dirt = 1;
+ mark_inode_dirty(dot);
MSDOS_I(inode)->i_busy = 0;
iput(dot);
iput(inode);
@@ -519,7 +520,8 @@
inode->i_nlink = 0;
inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
MSDOS_I(inode)->i_busy = 1;
- inode->i_dirt = dir->i_dirt = 1;
+ mark_inode_dirty(inode);
+ mark_inode_dirty(dir);
de->name[0] = DELETED_FLAG;
fat_mark_buffer_dirty(sb, bh, 1);
unlink_done:
@@ -580,11 +582,11 @@
}
if (S_ISDIR(new_inode->i_mode)) {
new_dir->i_nlink--;
- new_dir->i_dirt = 1;
+ mark_inode_dirty(new_dir);
}
new_inode->i_nlink = 0;
MSDOS_I(new_inode)->i_busy = 1;
- new_inode->i_dirt = 1;
+ mark_inode_dirty(new_inode);
new_de->name[0] = DELETED_FLAG;
fat_mark_buffer_dirty(sb, new_bh, 1);
iput(new_inode);
@@ -675,7 +677,7 @@
}
new_inode->i_nlink = 0;
MSDOS_I(new_inode)->i_busy = 1;
- new_inode->i_dirt = 1;
+ mark_inode_dirty(new_inode);
new_de->name[0] = DELETED_FLAG;
fat_mark_buffer_dirty(sb, new_bh, 1);
}
@@ -696,14 +698,14 @@
}
if (exists && S_ISDIR(new_inode->i_mode)) {
new_dir->i_nlink--;
- new_dir->i_dirt = 1;
+ mark_inode_dirty(new_dir);
}
msdos_read_inode(free_inode);
MSDOS_I(old_inode)->i_busy = 1;
MSDOS_I(old_inode)->i_linked = free_inode;
MSDOS_I(free_inode)->i_oldlink = old_inode;
fat_cache_inval_inode(old_inode);
- old_inode->i_dirt = 1;
+ mark_inode_dirty(old_inode);
old_de->name[0] = DELETED_FLAG;
fat_mark_buffer_dirty(sb, old_bh, 1);
fat_mark_buffer_dirty(sb, free_bh, 1);
@@ -711,7 +713,7 @@
MSDOS_I(new_inode)->i_depend = free_inode;
MSDOS_I(free_inode)->i_old = new_inode;
/* Two references now exist to free_inode so increase count */
- atomic_inc(&free_inode->i_count);
+ free_inode->i_count++;
/* free_inode is put after putting new_inode and old_inode */
iput(new_inode);
fat_brelse(sb, new_bh);
@@ -726,7 +728,7 @@
}
dotdot_de->start = MSDOS_I(dotdot_inode)->i_start =
MSDOS_I(new_dir)->i_start;
- dotdot_inode->i_dirt = 1;
+ mark_inode_dirty(dotdot_inode);
fat_mark_buffer_dirty(sb, dotdot_bh, 1);
old_dir->i_nlink--;
new_dir->i_nlink++;
@@ -793,6 +795,7 @@
NULL, /* mknod */
msdos_rename, /* rename */
NULL, /* readlink */
+ NULL, /* follow_link */
NULL, /* readpage */
NULL, /* writepage */
fat_bmap, /* bmap */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov