diff options
author | Pekka Enberg | 2006-10-20 08:28:14 +0200 |
---|---|---|
committer | Linus Torvalds | 2006-10-20 19:26:35 +0200 |
commit | 26da82058e62ea173559a26881b16d10089645ba (patch) | |
tree | 76d897ac2792683193b79def25b3e88ebaa8d49a /fs | |
parent | [PATCH] direct-io: sync and invalidate file region when falling back to buffe... (diff) | |
download | kernel-qcow2-linux-26da82058e62ea173559a26881b16d10089645ba.tar.gz kernel-qcow2-linux-26da82058e62ea173559a26881b16d10089645ba.tar.xz kernel-qcow2-linux-26da82058e62ea173559a26881b16d10089645ba.zip |
[PATCH] ecryptfs: use special_file()
Use the special_file() macro to check whether an inode is special instead of
open-coding it.
Acked-by: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ecryptfs/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c index 7a11b8ae6644..5938a232d11b 100644 --- a/fs/ecryptfs/main.c +++ b/fs/ecryptfs/main.c @@ -104,10 +104,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry, inode->i_op = &ecryptfs_dir_iops; if (S_ISDIR(lower_inode->i_mode)) inode->i_fop = &ecryptfs_dir_fops; - /* TODO: Is there a better way to identify if the inode is - * special? */ - if (S_ISBLK(lower_inode->i_mode) || S_ISCHR(lower_inode->i_mode) || - S_ISFIFO(lower_inode->i_mode) || S_ISSOCK(lower_inode->i_mode)) + if (special_file(lower_inode->i_mode)) init_special_inode(inode, lower_inode->i_mode, lower_inode->i_rdev); dentry->d_op = &ecryptfs_dops; |