diff options
author | Christoph Hellwig <hch@lst.de> | 2023-01-18 18:30:23 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2023-01-19 19:26:34 -0500 |
commit | 2d1a9d599b3ed9b9c58f64b8b71b5b9d770ceacf (patch) | |
tree | 05fbead28b1adb47e8dcc4535b6b1492bef59b97 /fs/minix/minix.h | |
parent | b61d15d5ff67c07907c194d4354ec0c35bc657d1 (diff) | |
download | linux-2d1a9d599b3ed9b9c58f64b8b71b5b9d770ceacf.tar.gz linux-2d1a9d599b3ed9b9c58f64b8b71b5b9d770ceacf.tar.bz2 linux-2d1a9d599b3ed9b9c58f64b8b71b5b9d770ceacf.zip |
minix: fix error handling in minix_set_link
If minix_prepare_chunk fails, updating c/mtime and marking the
dir inode dirty is wrong, as the inode hasn't been modified. Also
propagate the error to the caller.
Note that this moves the dir_put_page call later, but that matches
other uses of this helper in the directory code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/minix/minix.h')
-rw-r--r-- | fs/minix/minix.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/minix/minix.h b/fs/minix/minix.h index 7158a68bdc63..65c19e078ec4 100644 --- a/fs/minix/minix.h +++ b/fs/minix/minix.h @@ -69,7 +69,8 @@ extern int minix_add_link(struct dentry*, struct inode*); extern int minix_delete_entry(struct minix_dir_entry*, struct page*); extern int minix_make_empty(struct inode*, struct inode*); extern int minix_empty_dir(struct inode*); -extern void minix_set_link(struct minix_dir_entry*, struct page*, struct inode*); +int minix_set_link(struct minix_dir_entry *de, struct page *page, + struct inode *inode); extern struct minix_dir_entry *minix_dotdot(struct inode*, struct page**); extern ino_t minix_inode_by_name(struct dentry*); |