summaryrefslogtreecommitdiffstats
path: root/fs/coda/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-16 23:06:30 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-21 02:47:52 +0200
commitee60498f3ef94d7ed58dcd38077e27e839e7cafc (patch)
tree4aabab155ca905c48177def2c7af63daf12506cb /fs/coda/dir.c
parentarm: don't create useless copies to pass into debugfs_create_dir() (diff)
downloadlinux-ee60498f3ef94d7ed58dcd38077e27e839e7cafc.tar.xz
linux-ee60498f3ef94d7ed58dcd38077e27e839e7cafc.zip
coda_venus_readdir(): use offsetof()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--fs/coda/dir.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index cd5532398c15..9d52897c1b6d 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -449,8 +449,7 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
struct file *host_file;
struct dentry *de;
struct venus_dirent *vdir;
- unsigned long vdir_size =
- (unsigned long)(&((struct venus_dirent *)0)->d_name);
+ unsigned long vdir_size = offsetof(struct venus_dirent, d_name);
unsigned int type;
struct qstr name;
ino_t ino;