summaryrefslogtreecommitdiffstats
path: root/fs/umsdos
diff options
context:
space:
mode:
Diffstat (limited to 'fs/umsdos')
-rw-r--r--fs/umsdos/dir.c2
-rw-r--r--fs/umsdos/inode.c10
-rw-r--r--fs/umsdos/namei.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/umsdos/dir.c b/fs/umsdos/dir.c
index 9d37f24bc..2d8e60895 100644
--- a/fs/umsdos/dir.c
+++ b/fs/umsdos/dir.c
@@ -537,7 +537,7 @@ printk("umsdos_lookup_x: skipping DOS/linux\n");
* We've found it OK. Now hash the dentry with the inode.
*/
out_add:
- inode->i_count++;
+ atomic_inc(&inode->i_count);
d_add (dentry, inode);
dentry->d_op = &umsdos_dentry_operations;
ret = 0;
diff --git a/fs/umsdos/inode.c b/fs/umsdos/inode.c
index af69877d9..e4c991dc0 100644
--- a/fs/umsdos/inode.c
+++ b/fs/umsdos/inode.c
@@ -29,7 +29,7 @@ static struct dentry *check_pseudo_root(struct super_block *);
/*
- * Initialize a private filp
+ * Initialize a private filp. dentry is always a regular file one.
*/
void fill_new_filp (struct file *filp, struct dentry *dentry)
{
@@ -51,14 +51,14 @@ void UMSDOS_put_inode (struct inode *inode)
"put inode %p (%lu) pos %lu count=%d\n"
,inode, inode->i_ino
,inode->u.umsdos_i.pos
- ,inode->i_count));
+ ,atomic_read(&inode->i_count)));
if (inode == pseudo_root) {
printk (KERN_ERR "Umsdos: Oops releasing pseudo_root."
" Notify jacques@solucorp.qc.ca\n");
}
- if (inode->i_count == 1)
+ if (atomic_read(&inode->i_count) == 1)
inode->u.umsdos_i.i_patched = 0;
}
@@ -293,11 +293,11 @@ out:
/*
* Update the disk with the inode content
*/
-void UMSDOS_write_inode (struct inode *inode)
+void UMSDOS_write_inode (struct inode *inode, int unused)
{
struct iattr newattrs;
- fat_write_inode (inode);
+ fat_write_inode (inode, 0);
newattrs.ia_mtime = inode->i_mtime;
newattrs.ia_atime = inode->i_atime;
newattrs.ia_ctime = inode->i_ctime;
diff --git a/fs/umsdos/namei.c b/fs/umsdos/namei.c
index d3fe5eb61..c4cb0cb9f 100644
--- a/fs/umsdos/namei.c
+++ b/fs/umsdos/namei.c
@@ -279,14 +279,14 @@ static int umsdos_create_any (struct inode *dir, struct dentry *dentry,
goto out_remove_dput;
inode = fake->d_inode;
- inode->i_count++;
+ atomic_inc(&inode->i_count);
d_instantiate (dentry, inode);
dput(fake);
- if (inode->i_count > 1) {
+ if (atomic_read(&inode->i_count) > 1) {
printk(KERN_WARNING
"umsdos_create_any: %s/%s, ino=%ld, icount=%d??\n",
dentry->d_parent->d_name.name, dentry->d_name.name,
- inode->i_ino, inode->i_count);
+ inode->i_ino, atomic_read(&inode->i_count));
}
umsdos_lookup_patch_new(dentry, &info);
@@ -809,7 +809,7 @@ dentry->d_parent->d_name.name, info.fake.fname);
inode = temp->d_inode;
down(&inode->i_sem);
- inode->i_count++;
+ atomic_inc(&inode->i_count);
d_instantiate(dentry, inode);
/* N.B. this should have an option to create the EMD ... */