X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Freiserfs%2Fxattr.c;h=39d0d9630d310e46f0581fccd889b3220b4220fa;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=7ef7b4545d3959c4fee4ceb503d1926d4a3432bb;hpb=e812ccbe0c915857ebea6a632bfadc631f7504a9;p=linux-2.6.git diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 7ef7b4545..39d0d9630 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c @@ -589,8 +589,14 @@ open_file: break; } - inode->i_ctime = CURRENT_TIME; - mark_inode_dirty (inode); + /* We can't mark the inode dirty if it's not hashed. This is the case + * when we're inheriting the default ACL. If we dirty it, the inode + * gets marked dirty, but won't (ever) make it onto the dirty list until + * it's synced explicitly to clear I_DIRTY. This is bad. */ + if (!hlist_unhashed(&inode->i_hash)) { + inode->i_ctime = CURRENT_TIME; + mark_inode_dirty (inode); + } out_filp: up (&xinode->i_sem); @@ -761,6 +767,11 @@ reiserfs_xattr_del (struct inode *inode, const char *name) err = __reiserfs_xattr_del (dir, name, strlen (name)); dput (dir); + if (!err) { + inode->i_ctime = CURRENT_TIME; + mark_inode_dirty (inode); + } + out: return err; } @@ -1240,8 +1251,10 @@ xattr_lookup_poison (struct dentry *dentry, struct qstr *q1, struct qstr *name) name->hash == priv_root->d_name.hash && !memcmp (name->name, priv_root->d_name.name, name->len)) { return -ENOENT; - } - return 0; + } else if (q1->len == name->len && + !memcmp(q1->name, name->name, name->len)) + return 0; + return 1; } static struct dentry_operations xattr_lookup_poison_ops = {