diff options
Diffstat (limited to 'fs/hostfs/hostfs_kern.c')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 79783a0b2f4d..8130ce93a06a 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -622,11 +622,12 @@ int hostfs_unlink(struct inode *ino, struct dentry *dentry) | |||
622 | char *file; | 622 | char *file; |
623 | int err; | 623 | int err; |
624 | 624 | ||
625 | if ((file = dentry_name(dentry)) == NULL) | ||
626 | return -ENOMEM; | ||
627 | if (append) | 625 | if (append) |
628 | return -EPERM; | 626 | return -EPERM; |
629 | 627 | ||
628 | if ((file = dentry_name(dentry)) == NULL) | ||
629 | return -ENOMEM; | ||
630 | |||
630 | err = unlink_file(file); | 631 | err = unlink_file(file); |
631 | __putname(file); | 632 | __putname(file); |
632 | return err; | 633 | return err; |