aboutsummaryrefslogtreecommitdiffstats
path: root/fs/compat.c
diff options
context:
space:
mode:
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>2006-12-08 05:36:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:41 -0500
commit0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 (patch)
tree51763269e44eb9bf4d0f8c529577489902850cf9 /fs/compat.c
parentb65d34fd465f19fbe2f32f2205a9a06ca7c2bdeb (diff)
[PATCH] VFS: change struct file to use struct path
This patch changes struct file to use struct path instead of having independent pointers to struct dentry and struct vfsmount, and converts all users of f_{dentry,vfsmnt} in fs/ to use f_path.{dentry,mnt}. Additionally, it adds two #define's to make the transition easier for users of the f_dentry and f_vfsmnt. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/compat.c')
-rw-r--r--fs/compat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/compat.c b/fs/compat.c
index a7e3f162fb15..b766964a625c 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -232,7 +232,7 @@ asmlinkage long compat_sys_fstatfs(unsigned int fd, struct compat_statfs __user
232 file = fget(fd); 232 file = fget(fd);
233 if (!file) 233 if (!file)
234 goto out; 234 goto out;
235 error = vfs_statfs(file->f_dentry, &tmp); 235 error = vfs_statfs(file->f_path.dentry, &tmp);
236 if (!error) 236 if (!error)
237 error = put_compat_statfs(buf, &tmp); 237 error = put_compat_statfs(buf, &tmp);
238 fput(file); 238 fput(file);
@@ -303,7 +303,7 @@ asmlinkage long compat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct c
303 file = fget(fd); 303 file = fget(fd);
304 if (!file) 304 if (!file)
305 goto out; 305 goto out;
306 error = vfs_statfs(file->f_dentry, &tmp); 306 error = vfs_statfs(file->f_path.dentry, &tmp);
307 if (!error) 307 if (!error)
308 error = put_compat_statfs64(buf, &tmp); 308 error = put_compat_statfs64(buf, &tmp);
309 fput(file); 309 fput(file);
@@ -365,7 +365,7 @@ static void compat_ioctl_error(struct file *filp, unsigned int fd,
365 /* find the name of the device. */ 365 /* find the name of the device. */
366 path = (char *)__get_free_page(GFP_KERNEL); 366 path = (char *)__get_free_page(GFP_KERNEL);
367 if (path) { 367 if (path) {
368 fn = d_path(filp->f_dentry, filp->f_vfsmnt, path, PAGE_SIZE); 368 fn = d_path(filp->f_path.dentry, filp->f_path.mnt, path, PAGE_SIZE);
369 if (IS_ERR(fn)) 369 if (IS_ERR(fn))
370 fn = "?"; 370 fn = "?";
371 } 371 }
@@ -416,7 +416,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
416 case FIBMAP: 416 case FIBMAP:
417 case FIGETBSZ: 417 case FIGETBSZ:
418 case FIONREAD: 418 case FIONREAD:
419 if (S_ISREG(filp->f_dentry->d_inode->i_mode)) 419 if (S_ISREG(filp->f_path.dentry->d_inode->i_mode))
420 break; 420 break;
421 /*FALL THROUGH*/ 421 /*FALL THROUGH*/
422 422
@@ -438,7 +438,7 @@ asmlinkage long compat_sys_ioctl(unsigned int fd, unsigned int cmd,
438 goto found_handler; 438 goto found_handler;
439 } 439 }
440 440
441 if (S_ISSOCK(filp->f_dentry->d_inode->i_mode) && 441 if (S_ISSOCK(filp->f_path.dentry->d_inode->i_mode) &&
442 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { 442 cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
443 error = siocdevprivate_ioctl(fd, cmd, arg); 443 error = siocdevprivate_ioctl(fd, cmd, arg);
444 } else { 444 } else {
@@ -1259,7 +1259,7 @@ out:
1259 if (iov != iovstack) 1259 if (iov != iovstack)
1260 kfree(iov); 1260 kfree(iov);
1261 if ((ret + (type == READ)) > 0) { 1261 if ((ret + (type == READ)) > 0) {
1262 struct dentry *dentry = file->f_dentry; 1262 struct dentry *dentry = file->f_path.dentry;
1263 if (type == READ) 1263 if (type == READ)
1264 fsnotify_access(dentry); 1264 fsnotify_access(dentry);
1265 else 1265 else