Lines Matching refs:err
124 int err; in msdos_find() local
126 err = msdos_format_name(name, len, msdos_name, &sbi->options); in msdos_find()
127 if (err) in msdos_find()
130 err = fat_scan(dir, msdos_name, sinfo); in msdos_find()
131 if (!err && sbi->options.dotsOK) { in msdos_find()
134 err = -ENOENT; in msdos_find()
137 err = -ENOENT; in msdos_find()
139 if (err) in msdos_find()
142 return err; in msdos_find()
207 int err; in msdos_lookup() local
210 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_lookup()
211 switch (err) { in msdos_lookup()
220 inode = ERR_PTR(err); in msdos_lookup()
234 int err; in msdos_add_entry() local
250 err = fat_add_entries(dir, &de, 1, sinfo); in msdos_add_entry()
251 if (err) in msdos_add_entry()
252 return err; in msdos_add_entry()
272 int err, is_hid; in msdos_create() local
276 err = msdos_format_name(dentry->d_name.name, dentry->d_name.len, in msdos_create()
278 if (err) in msdos_create()
284 err = -EINVAL; in msdos_create()
289 err = msdos_add_entry(dir, msdos_name, 0, is_hid, 0, &ts, &sinfo); in msdos_create()
290 if (err) in msdos_create()
295 err = PTR_ERR(inode); in msdos_create()
304 if (!err) in msdos_create()
305 err = fat_flush_inodes(sb, dir, inode); in msdos_create()
306 return err; in msdos_create()
315 int err; in msdos_rmdir() local
318 err = fat_dir_empty(inode); in msdos_rmdir()
319 if (err) in msdos_rmdir()
321 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_rmdir()
322 if (err) in msdos_rmdir()
325 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ in msdos_rmdir()
326 if (err) in msdos_rmdir()
335 if (!err) in msdos_rmdir()
336 err = fat_flush_inodes(sb, dir, inode); in msdos_rmdir()
338 return err; in msdos_rmdir()
349 int err, is_hid, cluster; in msdos_mkdir() local
353 err = msdos_format_name(dentry->d_name.name, dentry->d_name.len, in msdos_mkdir()
355 if (err) in msdos_mkdir()
361 err = -EINVAL; in msdos_mkdir()
368 err = cluster; in msdos_mkdir()
371 err = msdos_add_entry(dir, msdos_name, 1, is_hid, cluster, &ts, &sinfo); in msdos_mkdir()
372 if (err) in msdos_mkdir()
379 err = PTR_ERR(inode); in msdos_mkdir()
397 return err; in msdos_mkdir()
406 int err; in msdos_unlink() local
409 err = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &sinfo); in msdos_unlink()
410 if (err) in msdos_unlink()
413 err = fat_remove_entries(dir, &sinfo); /* and releases bh */ in msdos_unlink()
414 if (err) in msdos_unlink()
421 if (!err) in msdos_unlink()
422 err = fat_flush_inodes(sb, dir, inode); in msdos_unlink()
424 return err; in msdos_unlink()
438 int err, old_attrs, is_dir, update_dotdot, corrupt = 0; in do_msdos_rename() local
444 err = fat_scan(old_dir, old_name, &old_sinfo); in do_msdos_rename()
445 if (err) { in do_msdos_rename()
446 err = -EIO; in do_msdos_rename()
454 err = -EIO; in do_msdos_rename()
460 err = fat_scan(new_dir, new_name, &sinfo); in do_msdos_rename()
461 if (!err) { in do_msdos_rename()
465 err = -EINVAL; in do_msdos_rename()
473 err = fat_sync_inode(old_inode); in do_msdos_rename()
474 if (err) { in do_msdos_rename()
493 if (err) in do_msdos_rename()
496 err = fat_dir_empty(new_inode); in do_msdos_rename()
497 if (err) in do_msdos_rename()
503 err = msdos_add_entry(new_dir, new_name, is_dir, is_hid, 0, in do_msdos_rename()
505 if (err) in do_msdos_rename()
518 err = fat_sync_inode(old_inode); in do_msdos_rename()
519 if (err) in do_msdos_rename()
528 err = sync_dirty_buffer(dotdot_bh); in do_msdos_rename()
529 if (err) in do_msdos_rename()
537 err = fat_remove_entries(old_dir, &old_sinfo); /* and releases bh */ in do_msdos_rename()
539 if (err) in do_msdos_rename()
558 return err; in do_msdos_rename()
602 int err, is_hid; in msdos_rename() local
609 err = msdos_format_name(old_dentry->d_name.name, in msdos_rename()
612 if (err) in msdos_rename()
614 err = msdos_format_name(new_dentry->d_name.name, in msdos_rename()
617 if (err) in msdos_rename()
623 err = do_msdos_rename(old_dir, old_msdos_name, old_dentry, in msdos_rename()
627 if (!err) in msdos_rename()
628 err = fat_flush_inodes(sb, old_dir, new_dir); in msdos_rename()
629 return err; in msdos_rename()