[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dazuko-devel] patch for Ubuntu 8.10 / OpenSuse 11.1
From: |
Lino Sanfilippo |
Subject: |
[Dazuko-devel] patch for Ubuntu 8.10 / OpenSuse 11.1 |
Date: |
Tue, 10 Feb 2009 12:07:50 +0100 |
User-agent: |
IceDove 1.5.0.14eol (X11/20090105) |
Geschäftsführender Gesellschafter: Tjark Auerbach
Sitz der Gesellschaft: Tettnang
Handelsregister: Amtsgericht Ulm, HRB 630992
ALLGEMEINE GESCHÄFTSBEDINGUNGEN
Es gelten unsere Allgemeinen Geschäftsbedingungen
(AGB). Sie finden sie in der jeweils gültigen Fassung
im Internet unter http://www.avira.de/agb
***************************************************
diff -rup dazukofs-3.0.0-rc4/inode.c dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/inode.c
--- dazukofs-3.0.0-rc4/inode.c 2009-02-10 10:57:51.000000000 +0100
+++ dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/inode.c 2009-02-10 10:58:28.000000000
+0100
@@ -216,6 +216,7 @@ static int dazukofs_mknod(struct inode *
dev_t dev)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct dentry *lower_dentry_parent = dget(lower_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err = -ENOENT;
@@ -223,7 +224,8 @@ static int dazukofs_mknod(struct inode *
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_mknod(lower_dentry_parent_inode, lower_dentry, mode, dev);
+ err = vfs_mknod(lower_dentry_parent_inode, lower_dentry, lower_mnt,
+ mode, dev);
if (err)
goto out;
@@ -248,6 +250,7 @@ out:
static int dazukofs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct dentry *lower_dentry_parent = dget(lower_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err = -ENOENT;
@@ -255,7 +258,8 @@ static int dazukofs_mkdir(struct inode *
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_mkdir(lower_dentry_parent_inode, lower_dentry, mode);
+ err = vfs_mkdir(lower_dentry_parent_inode, lower_dentry, lower_mnt,
+ mode);
if (err)
goto out;
@@ -333,6 +337,7 @@ static int dazukofs_symlink(struct inode
const char *symname)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct dentry *lower_dentry_parent = dget(lower_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err = -ENOENT;
@@ -340,7 +345,8 @@ static int dazukofs_symlink(struct inode
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_symlink(lower_dentry_parent_inode, lower_dentry, symname);
+ err = vfs_symlink(lower_dentry_parent_inode, lower_dentry, lower_mnt,
+ symname);
if (err)
goto out;
@@ -464,11 +470,12 @@ static int dazukofs_permission(struct in
static int dazukofs_setattr(struct dentry *dentry, struct iattr *ia)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct inode *inode = dentry->d_inode;
struct inode *lower_inode = GET_LOWER_INODE(inode);
int err;
- err = notify_change(lower_dentry, ia);
+ err = notify_change(lower_dentry, lower_mnt, ia);
fsstack_copy_attr_all(inode, lower_inode, NULL);
fsstack_copy_inode_size(inode, lower_inode);
@@ -603,6 +610,8 @@ static int dazukofs_link(struct dentry *
{
struct dentry *lower_old_dentry = GET_LOWER_DENTRY(old_dentry);
struct dentry *lower_new_dentry = GET_LOWER_DENTRY(new_dentry);
+ struct vfsmount *lower_old_mnt = GET_LOWER_MNT(old_dentry);
+ struct vfsmount *lower_new_mnt = GET_LOWER_MNT(new_dentry);
struct dentry *lower_dentry_parent = dget(lower_new_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err = -ENOENT;
@@ -610,8 +619,9 @@ static int dazukofs_link(struct dentry *
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_link(lower_old_dentry, lower_dentry_parent_inode,
- lower_new_dentry);
+ err = vfs_link(lower_old_dentry, lower_old_mnt,
+ lower_dentry_parent_inode, lower_new_dentry,
+ lower_new_mnt);
if (err)
goto out;
@@ -635,6 +645,7 @@ out:
static int dazukofs_unlink(struct inode *dir, struct dentry *dentry)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct dentry *lower_dentry_parent = dget(lower_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err;
@@ -642,7 +653,7 @@ static int dazukofs_unlink(struct inode
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_unlink(lower_dentry_parent_inode, lower_dentry);
+ err = vfs_unlink(lower_dentry_parent_inode, lower_dentry, lower_mnt);
if (err)
goto out;
@@ -664,6 +675,7 @@ out:
static int dazukofs_rmdir(struct inode *dir, struct dentry *dentry)
{
struct dentry *lower_dentry = GET_LOWER_DENTRY(dentry);
+ struct vfsmount *lower_mnt = GET_LOWER_MNT(dentry);
struct dentry *lower_dentry_parent = dget(lower_dentry->d_parent);
struct inode *lower_dentry_parent_inode = lower_dentry_parent->d_inode;
int err;
@@ -671,7 +683,7 @@ static int dazukofs_rmdir(struct inode *
mutex_lock_nested(&(lower_dentry_parent_inode->i_mutex),
I_MUTEX_PARENT);
- err = vfs_rmdir(lower_dentry_parent_inode, lower_dentry);
+ err = vfs_rmdir(lower_dentry_parent_inode, lower_dentry, lower_mnt);
if (err)
goto out;
@@ -696,6 +708,8 @@ static int dazukofs_rename(struct inode
{
struct dentry *lower_old_dentry = GET_LOWER_DENTRY(old_dentry);
struct dentry *lower_new_dentry = GET_LOWER_DENTRY(new_dentry);
+ struct vfsmount *lower_old_mnt = GET_LOWER_MNT(old_dentry);
+ struct vfsmount *lower_new_mnt = GET_LOWER_MNT(new_dentry);
struct dentry *lower_old_dentry_parent =
dget(lower_old_dentry->d_parent);
struct dentry *lower_new_dentry_parent =
@@ -718,7 +732,8 @@ static int dazukofs_rename(struct inode
lock_rename(lower_old_dentry_parent, lower_new_dentry_parent);
err = vfs_rename(lower_old_dentry_parent_inode, lower_old_dentry,
- lower_new_dentry_parent_inode, lower_new_dentry);
+ lower_old_mnt, lower_new_dentry_parent_inode,
+ lower_new_dentry, lower_new_mnt);
unlock_rename(lower_old_dentry_parent, lower_new_dentry_parent);
if (err)
diff -rup dazukofs-3.0.0-rc4/Makefile
dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/Makefile
--- dazukofs-3.0.0-rc4/Makefile 2009-02-10 10:57:51.000000000 +0100
+++ dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/Makefile 2009-02-10
10:58:28.000000000 +0100
@@ -4,6 +4,7 @@
DAZUKOFS_KERNEL_SRC = /lib/modules/`uname -r`/build
DAZUKOFS_KERNEL_INSTALL = /lib/modules/`uname -r`/kernel/fs/dazukofs
+EXTRA_CFLAGS += -Wall
obj-m += dazukofs.o
diff -rup dazukofs-3.0.0-rc4/super.c dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/super.c
--- dazukofs-3.0.0-rc4/super.c 2009-02-10 10:57:51.000000000 +0100
+++ dazukofs-3.0.0-rc4_2.6.27_ub_os11.1/super.c 2009-02-10 10:58:28.000000000
+0100
@@ -170,7 +170,10 @@ static int dazukofs_read_super(struct su
err = -ENOENT;
goto out_put;
}
-
+ if (!S_ISDIR(lower_root->d_inode->i_mode)) {
+ err = -ENOENT;
+ goto out_put;
+ }
SET_LOWER_SB(sb, lower_root->d_sb);
sb->s_maxbytes = lower_root->d_sb->s_maxbytes;
SET_LOWER_DENTRY(sb->s_root, lower_root, lower_mnt);
@@ -213,6 +216,7 @@ static int dazukofs_get_sb(struct file_s
out_abort:
up_write(&sb->s_umount);
+ dput(sb->s_root);
deactivate_super(sb);
out:
return err;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dazuko-devel] patch for Ubuntu 8.10 / OpenSuse 11.1,
Lino Sanfilippo <=