lkml.org 
[lkml]   [2002]   [Jan]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 1 Jan 2002 17:57:09 -0500 (EST)
FromAlexander Viro <>
SubjectRe: NFS "dev_t" issues..

On Tue, 1 Jan 2002, Linus Torvalds wrote:

> Apart from some knfsd issues, most of the kdev_t users were proper. The
> strict type-checking found one bug in the SCSI layer (which I knew about,
> and was one of the impetuses for doing it in the first place), and found a
> lot of small "works-but-will-break-with-a-bigger-kdev_t" issues).

Sigh...  Most of the ->i_dev instances are crap and ought to be replaced
with ->i_sb.  At the very least, let's

--- C2-pre6/fs/namei.c	Tue Jan  1 17:49:13 2002
+++ /tmp/namei.c	Tue Jan  1 17:54:08 2002
@@ -1589,7 +1589,7 @@
 		goto exit_lock;
 
 	error = -EXDEV;
-	if (!kdev_same(dir->i_dev, inode->i_dev))
+	if (dir->i_sb != inode->i_sb)
 		goto exit_lock;
 
 	/*
@@ -1707,7 +1707,7 @@
 	if (error)
 		return error;
 
-	if (!kdev_same(new_dir->i_dev, old_dir->i_dev))
+	if (new_dir->i_sb != old_dir->i_sb)
 		return -EXDEV;
 
 	if (!new_dentry->d_inode)
@@ -1787,7 +1787,7 @@
 	if (error)
 		return error;
 
-	if (!kdev_same(new_dir->i_dev, old_dir->i_dev))
+	if (new_dir->i_sb != old_dir->i_sb)
 		return -EXDEV;
 
 	if (!new_dentry->d_inode)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:15    [W:0.271 / U:0.140 seconds]
©2003-2008 Jasper Spaans