diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /mm/nommu.c | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) | |
download | kernel_goldelico_gta04-496ad9aa8ef448058e36ca7a787c61f2e63f0f54.zip kernel_goldelico_gta04-496ad9aa8ef448058e36ca7a787c61f2e63f0f54.tar.gz kernel_goldelico_gta04-496ad9aa8ef448058e36ca7a787c61f2e63f0f54.tar.bz2 |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'mm/nommu.c')
-rw-r--r-- | mm/nommu.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -941,7 +941,7 @@ static int validate_mmap_request(struct file *file, */ mapping = file->f_mapping; if (!mapping) - mapping = file->f_path.dentry->d_inode->i_mapping; + mapping = file_inode(file)->i_mapping; capabilities = 0; if (mapping && mapping->backing_dev_info) @@ -950,7 +950,7 @@ static int validate_mmap_request(struct file *file, if (!capabilities) { /* no explicit capabilities set, so assume some * defaults */ - switch (file->f_path.dentry->d_inode->i_mode & S_IFMT) { + switch (file_inode(file)->i_mode & S_IFMT) { case S_IFREG: case S_IFBLK: capabilities = BDI_CAP_MAP_COPY; @@ -985,11 +985,11 @@ static int validate_mmap_request(struct file *file, !(file->f_mode & FMODE_WRITE)) return -EACCES; - if (IS_APPEND(file->f_path.dentry->d_inode) && + if (IS_APPEND(file_inode(file)) && (file->f_mode & FMODE_WRITE)) return -EACCES; - if (locks_verify_locked(file->f_path.dentry->d_inode)) + if (locks_verify_locked(file_inode(file))) return -EAGAIN; if (!(capabilities & BDI_CAP_MAP_DIRECT)) @@ -1322,8 +1322,8 @@ unsigned long do_mmap_pgoff(struct file *file, continue; /* search for overlapping mappings on the same file */ - if (pregion->vm_file->f_path.dentry->d_inode != - file->f_path.dentry->d_inode) + if (file_inode(pregion->vm_file) != + file_inode(file)) continue; if (pregion->vm_pgoff >= pgend) |