On Tue, 2022-04-19 at 23:50 +0530, Rishabh Dave wrote: > Hi Jeff, > > Thanks for the review! > > On Tue, 19 Apr 2022 at 23:34, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > > > > > - # find $dev as the source, and print result in "$dev $mnt" format > > > - local mount_rec=`findmnt -rncv -S $dev -o SOURCE,TARGET` > > > - [ -n "$mount_rec" ] || return 1 # 1 = not mounted > > > + # this check doesn't work on ceph-fuse > > > + if [ "$dev" != "ceph-fuse" ]; then > > > + _check_if_dev_already_mounted $dev $mnt > > > + dev_already_mounted=$? > > > > > > > Shouldn't there be a "fi" above? > > > > > - # if it's mounted, make sure its on $mnt > > > - if [ "$mount_rec" != "$dev $mnt" ]; then > > > - echo "$devname=$dev is mounted but not on $mntname=$mnt - aborting" > > > - echo "Already mounted result:" > > > - echo $mount_rec > > > - return 2 # 2 = mounted on wrong mnt > > > + if [ $dev_already_mounted -ne 0 ]; then > > > + return $dev_already_mounted > > > + fi > > > fi > > > > Here's the "fi" for the "if" you referred to above. > Oops, I misread the patch! This looks fine to me: Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>