patch-2.1.45 linux/drivers/block/loop.c

Next file: linux/drivers/block/md.c
Previous file: linux/arch/sparc64/prom/misc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.44/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -292,7 +292,7 @@
 		return -EBADF;
 	if (lo->lo_inode)
 		return -EBUSY;
-	inode = file->f_inode;
+	inode = file->f_dentry->d_inode;
 	if (!inode) {
 		printk("loop_set_fd: NULL inode?!?\n");
 		return -EINVAL;
@@ -318,7 +318,7 @@
 	}
 
 	lo->lo_inode = inode;
-	atomic_inc(&lo->lo_inode->i_count);
+	lo->lo_inode->i_count++;
 	lo->transfer = NULL;
 	figure_loop_size(lo);
 	MOD_INC_USE_COUNT;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov