diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /fs/ocfs2/symlink.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'fs/ocfs2/symlink.c')
-rw-r--r-- | fs/ocfs2/symlink.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/ocfs2/symlink.c b/fs/ocfs2/symlink.c index e3421030a69f..32499d213fc4 100644 --- a/fs/ocfs2/symlink.c +++ b/fs/ocfs2/symlink.c | |||
@@ -137,20 +137,20 @@ static void *ocfs2_fast_follow_link(struct dentry *dentry, | |||
137 | } | 137 | } |
138 | 138 | ||
139 | memcpy(link, target, len); | 139 | memcpy(link, target, len); |
140 | nd_set_link(nd, link); | ||
141 | 140 | ||
142 | bail: | 141 | bail: |
142 | nd_set_link(nd, status ? ERR_PTR(status) : link); | ||
143 | brelse(bh); | 143 | brelse(bh); |
144 | 144 | ||
145 | mlog_exit(status); | 145 | mlog_exit(status); |
146 | return status ? ERR_PTR(status) : link; | 146 | return NULL; |
147 | } | 147 | } |
148 | 148 | ||
149 | static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) | 149 | static void ocfs2_fast_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) |
150 | { | 150 | { |
151 | char *link = cookie; | 151 | char *link = nd_get_link(nd); |
152 | 152 | if (!IS_ERR(link)) | |
153 | kfree(link); | 153 | kfree(link); |
154 | } | 154 | } |
155 | 155 | ||
156 | const struct inode_operations ocfs2_symlink_inode_operations = { | 156 | const struct inode_operations ocfs2_symlink_inode_operations = { |
@@ -163,6 +163,7 @@ const struct inode_operations ocfs2_symlink_inode_operations = { | |||
163 | .getxattr = generic_getxattr, | 163 | .getxattr = generic_getxattr, |
164 | .listxattr = ocfs2_listxattr, | 164 | .listxattr = ocfs2_listxattr, |
165 | .removexattr = generic_removexattr, | 165 | .removexattr = generic_removexattr, |
166 | .fiemap = ocfs2_fiemap, | ||
166 | }; | 167 | }; |
167 | const struct inode_operations ocfs2_fast_symlink_inode_operations = { | 168 | const struct inode_operations ocfs2_fast_symlink_inode_operations = { |
168 | .readlink = ocfs2_readlink, | 169 | .readlink = ocfs2_readlink, |
@@ -174,4 +175,5 @@ const struct inode_operations ocfs2_fast_symlink_inode_operations = { | |||
174 | .getxattr = generic_getxattr, | 175 | .getxattr = generic_getxattr, |
175 | .listxattr = ocfs2_listxattr, | 176 | .listxattr = ocfs2_listxattr, |
176 | .removexattr = generic_removexattr, | 177 | .removexattr = generic_removexattr, |
178 | .fiemap = ocfs2_fiemap, | ||
177 | }; | 179 | }; |