Lines Matching refs:err
125 int err; in msdos_find() local
127 err = msdos_format_name(name, len, msdos_name, &sbi->options); in msdos_find()
128 if (err) in msdos_find()
131 err = fat_scan(dir, msdos_name, sinfo); in msdos_find()
132 if (!err && sbi->options.dotsOK) { in msdos_find()
135 err = -ENOENT; in msdos_find()
138 err = -ENOENT; in msdos_find()
140 if (err) in msdos_find()
143 return err; in msdos_find()
207 int err; in msdos_lookup() local
211 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_lookup()
212 if (err) { in msdos_lookup()
213 if (err == -ENOENT) { in msdos_lookup()
223 err = PTR_ERR(inode); in msdos_lookup()
236 return ERR_PTR(err); in msdos_lookup()
247 int err; in msdos_add_entry() local
264 err = fat_add_entries(dir, &de, 1, sinfo); in msdos_add_entry()
265 if (err) in msdos_add_entry()
266 return err; in msdos_add_entry()
286 int err, is_hid; in msdos_create() local
290 err = msdos_format_name(dentry->d_name.name, dentry->d_name.len, in msdos_create()
292 if (err) in msdos_create()
298 err = -EINVAL; in msdos_create()
303 err = msdos_add_entry(dir, msdos_name, 0, is_hid, 0, &ts, &sinfo); in msdos_create()
304 if (err) in msdos_create()
309 err = PTR_ERR(inode); in msdos_create()
318 if (!err) in msdos_create()
319 err = fat_flush_inodes(sb, dir, inode); in msdos_create()
320 return err; in msdos_create()
329 int err; in msdos_rmdir() local
336 err = fat_dir_empty(inode); in msdos_rmdir()
337 if (err) in msdos_rmdir()
339 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_rmdir()
340 if (err) in msdos_rmdir()
343 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ in msdos_rmdir()
344 if (err) in msdos_rmdir()
353 if (!err) in msdos_rmdir()
354 err = fat_flush_inodes(sb, dir, inode); in msdos_rmdir()
356 return err; in msdos_rmdir()
367 int err, is_hid, cluster; in msdos_mkdir() local
371 err = msdos_format_name(dentry->d_name.name, dentry->d_name.len, in msdos_mkdir()
373 if (err) in msdos_mkdir()
379 err = -EINVAL; in msdos_mkdir()
386 err = cluster; in msdos_mkdir()
389 err = msdos_add_entry(dir, msdos_name, 1, is_hid, cluster, &ts, &sinfo); in msdos_mkdir()
390 if (err) in msdos_mkdir()
397 err = PTR_ERR(inode); in msdos_mkdir()
415 return err; in msdos_mkdir()
424 int err; in msdos_unlink() local
427 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_unlink()
428 if (err) in msdos_unlink()
431 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ in msdos_unlink()
432 if (err) in msdos_unlink()
439 if (!err) in msdos_unlink()
440 err = fat_flush_inodes(sb, dir, inode); in msdos_unlink()
442 return err; in msdos_unlink()
456 int err, old_attrs, is_dir, update_dotdot, corrupt = 0; in do_msdos_rename() local
462 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
463 if (err) { in do_msdos_rename()
464 err = -EIO; in do_msdos_rename()
473 err = -EIO; in do_msdos_rename()
479 err = fat_scan(new_dir, new_name, &sinfo); in do_msdos_rename()
480 if (!err) { in do_msdos_rename()
484 err = -EINVAL; in do_msdos_rename()
492 err = fat_sync_inode(old_inode); in do_msdos_rename()
493 if (err) { in do_msdos_rename()
512 if (err) in do_msdos_rename()
515 err = fat_dir_empty(new_inode); in do_msdos_rename()
516 if (err) in do_msdos_rename()
522 err = msdos_add_entry(new_dir, new_name, is_dir, is_hid, 0, in do_msdos_rename()
524 if (err) in do_msdos_rename()
537 err = fat_sync_inode(old_inode); in do_msdos_rename()
538 if (err) in do_msdos_rename()
549 err = sync_dirty_buffer(dotdot_bh); in do_msdos_rename()
550 if (err) in do_msdos_rename()
558 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in do_msdos_rename()
560 if (err) in do_msdos_rename()
579 return err; in do_msdos_rename()
624 int err, is_hid; in msdos_rename() local
628 err = msdos_format_name(old_dentry->d_name.name, in msdos_rename()
631 if (err) in msdos_rename()
633 err = msdos_format_name(new_dentry->d_name.name, in msdos_rename()
636 if (err) in msdos_rename()
642 err = do_msdos_rename(old_dir, old_msdos_name, old_dentry, in msdos_rename()
646 if (!err) in msdos_rename()
647 err = fat_flush_inodes(sb, old_dir, new_dir); in msdos_rename()
648 return err; in msdos_rename()