diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-21 05:09:22 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-09-21 05:09:22 -0400 |
commit | 7cce2f4cb7f5f641f78c8e3eea4e7b1b96cb71c0 (patch) | |
tree | b064d077928cf224660ab1e1841cdab2c9fd8b08 /fs/udf/directory.c | |
parent | e055f7e873d900925c222cf2d1ec955af4a9ca90 (diff) | |
parent | ebc79c4f8da0f92efa968e0328f32334a2ce80cf (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into linux-next
Conflicts:
fs/ubifs/super.c
Merge the upstream tree in order to resolve a conflict with the
per-bdi writeback changes from the linux-2.6-block tree.
Diffstat (limited to 'fs/udf/directory.c')
-rw-r--r-- | fs/udf/directory.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/fs/udf/directory.c b/fs/udf/directory.c index 1d2c570704c8..2ffdb6733af1 100644 --- a/fs/udf/directory.c +++ b/fs/udf/directory.c | |||
@@ -18,59 +18,6 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/buffer_head.h> | 19 | #include <linux/buffer_head.h> |
20 | 20 | ||
21 | #if 0 | ||
22 | static uint8_t *udf_filead_read(struct inode *dir, uint8_t *tmpad, | ||
23 | uint8_t ad_size, struct kernel_lb_addr fe_loc, | ||
24 | int *pos, int *offset, struct buffer_head **bh, | ||
25 | int *error) | ||
26 | { | ||
27 | int loffset = *offset; | ||
28 | int block; | ||
29 | uint8_t *ad; | ||
30 | int remainder; | ||
31 | |||
32 | *error = 0; | ||
33 | |||
34 | ad = (uint8_t *)(*bh)->b_data + *offset; | ||
35 | *offset += ad_size; | ||
36 | |||
37 | if (!ad) { | ||
38 | brelse(*bh); | ||
39 | *error = 1; | ||
40 | return NULL; | ||
41 | } | ||
42 | |||
43 | if (*offset == dir->i_sb->s_blocksize) { | ||
44 | brelse(*bh); | ||
45 | block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); | ||
46 | if (!block) | ||
47 | return NULL; | ||
48 | *bh = udf_tread(dir->i_sb, block); | ||
49 | if (!*bh) | ||
50 | return NULL; | ||
51 | } else if (*offset > dir->i_sb->s_blocksize) { | ||
52 | ad = tmpad; | ||
53 | |||
54 | remainder = dir->i_sb->s_blocksize - loffset; | ||
55 | memcpy((uint8_t *)ad, (*bh)->b_data + loffset, remainder); | ||
56 | |||
57 | brelse(*bh); | ||
58 | block = udf_get_lb_pblock(dir->i_sb, fe_loc, ++*pos); | ||
59 | if (!block) | ||
60 | return NULL; | ||
61 | (*bh) = udf_tread(dir->i_sb, block); | ||
62 | if (!*bh) | ||
63 | return NULL; | ||
64 | |||
65 | memcpy((uint8_t *)ad + remainder, (*bh)->b_data, | ||
66 | ad_size - remainder); | ||
67 | *offset = ad_size - remainder; | ||
68 | } | ||
69 | |||
70 | return ad; | ||
71 | } | ||
72 | #endif | ||
73 | |||
74 | struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, | 21 | struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos, |
75 | struct udf_fileident_bh *fibh, | 22 | struct udf_fileident_bh *fibh, |
76 | struct fileIdentDesc *cfi, | 23 | struct fileIdentDesc *cfi, |
@@ -248,39 +195,6 @@ struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize, int *offset) | |||
248 | return fi; | 195 | return fi; |
249 | } | 196 | } |
250 | 197 | ||
251 | #if 0 | ||
252 | static struct extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset) | ||
253 | { | ||
254 | struct extent_ad *ext; | ||
255 | struct fileEntry *fe; | ||
256 | uint8_t *ptr; | ||
257 | |||
258 | if ((!buffer) || (!offset)) { | ||
259 | printk(KERN_ERR "udf: udf_get_fileextent() invalidparms\n"); | ||
260 | return NULL; | ||
261 | } | ||
262 | |||
263 | fe = (struct fileEntry *)buffer; | ||
264 | |||
265 | if (fe->descTag.tagIdent != cpu_to_le16(TAG_IDENT_FE)) { | ||
266 | udf_debug("0x%x != TAG_IDENT_FE\n", | ||
267 | le16_to_cpu(fe->descTag.tagIdent)); | ||
268 | return NULL; | ||
269 | } | ||
270 | |||
271 | ptr = (uint8_t *)(fe->extendedAttr) + | ||
272 | le32_to_cpu(fe->lengthExtendedAttr); | ||
273 | |||
274 | if ((*offset > 0) && (*offset < le32_to_cpu(fe->lengthAllocDescs))) | ||
275 | ptr += *offset; | ||
276 | |||
277 | ext = (struct extent_ad *)ptr; | ||
278 | |||
279 | *offset = *offset + sizeof(struct extent_ad); | ||
280 | return ext; | ||
281 | } | ||
282 | #endif | ||
283 | |||
284 | struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, | 198 | struct short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset, |
285 | int inc) | 199 | int inc) |
286 | { | 200 | { |