X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fstat.c;h=9cf41f719d50d18adf2fca7a6582b0ecfdc506aa;hb=8962cadbe7cbc4ed0fff94f56ebab505a10afd2e;hp=38a8cb2a28de4292047f93fa6fae59bf1490eb7d;hpb=3be11c8f4f2fa194834c2e83540f34da442b8977;p=linux-2.6-omap-h63xx.git diff --git a/fs/stat.c b/fs/stat.c index 38a8cb2a28d..9cf41f719d5 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -63,8 +62,8 @@ int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat) error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd); if (!error) { - error = vfs_getattr(nd.mnt, nd.dentry, stat); - path_release(&nd); + error = vfs_getattr(nd.path.mnt, nd.path.dentry, stat); + path_put(&nd.path); } return error; } @@ -83,8 +82,8 @@ int vfs_lstat_fd(int dfd, char __user *name, struct kstat *stat) error = __user_walk_fd(dfd, name, 0, &nd); if (!error) { - error = vfs_getattr(nd.mnt, nd.dentry, stat); - path_release(&nd); + error = vfs_getattr(nd.path.mnt, nd.path.dentry, stat); + path_put(&nd.path); } return error; } @@ -303,17 +302,18 @@ asmlinkage long sys_readlinkat(int dfd, const char __user *path, error = __user_walk_fd(dfd, path, 0, &nd); if (!error) { - struct inode * inode = nd.dentry->d_inode; + struct inode *inode = nd.path.dentry->d_inode; error = -EINVAL; if (inode->i_op && inode->i_op->readlink) { - error = security_inode_readlink(nd.dentry); + error = security_inode_readlink(nd.path.dentry); if (!error) { - touch_atime(nd.mnt, nd.dentry); - error = inode->i_op->readlink(nd.dentry, buf, bufsiz); + touch_atime(nd.path.mnt, nd.path.dentry); + error = inode->i_op->readlink(nd.path.dentry, + buf, bufsiz); } } - path_release(&nd); + path_put(&nd.path); } return error; }