summaryrefslogtreecommitdiff
path: root/fs/adfs/dir.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-12-09 14:10:47 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2020-01-21 04:12:42 +0300
commitaacc954c1be8910a994e09a8f8757a2e3e231c37 (patch)
tree99f06bcba784a12524ca2bd068d3ba9f3fd255ad /fs/adfs/dir.c
parentcc625ccd0e6c2804cd0935743e3b51121a712562 (diff)
downloadlinux-aacc954c1be8910a994e09a8f8757a2e3e231c37.tar.xz
fs/adfs: newdir: split out directory commit from update
After changing a directory, we need to update the sequence numbers and calculate the new check byte before the directory is scheduled to be written back to the media. Since this needs to happen for any change to the directory, move this into a separate method. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/dir.c')
-rw-r--r--fs/adfs/dir.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index 7fda44464121..3d4bbe836fb5 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -295,6 +295,10 @@ adfs_dir_update(struct super_block *sb, struct object_info *obj, int wait)
ret = ops->update(&dir, obj);
if (ret)
goto forget;
+
+ ret = ops->commit(&dir);
+ if (ret)
+ goto forget;
up_write(&adfs_dir_rwsem);
adfs_dir_mark_dirty(&dir);