On Thu, 2009-05-14 at 01:31 +0900, hooanon05@xxxxxxxxxxx wrote: > diff --git a/fs/namei.c b/fs/namei.c > index b207821..820c386 100644 > --- a/fs/namei.c > +++ b/fs/namei.c > @@ -2409,9 +2409,12 @@ int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_de > if (error) > return error; > > + error = -ENOENT; > mutex_lock(&inode->i_mutex); > - DQUOT_INIT(dir); > - error = dir->i_op->link(old_dentry, dir, new_dentry); > + if (inode->i_nlink) { > + DQUOT_INIT(dir); > + error = dir->i_op->link(old_dentry, dir, new_dentry); > + } > mutex_unlock(&inode->i_mutex); > if (!error) > fsnotify_link(dir, inode, new_dentry); > Looks correct to me. I wonder what VFS guys think - should we fix UBIFS or this can be done at the VFS layer? -- Best regards, Artem Bityutskiy (Битюцкий Артём) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html