mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Zarochentcev <zam@namesys.com>
To: torvalds@transmeta.com, alan@redhat.com
Cc: linux-kernel@vger.kernel.org, reiserfs-list@namesys.com
Subject: [PATCH] adds missed lock_kernel/unlock_kernel to reiserfs_dir_fsync().
Date: Fri, 2 Mar 2001 19:54:52 +0300	[thread overview]
Message-ID: <20010302195452.A2133@crimson.namesys.com> (raw)

Hi !

Bug found in reiserfs in linux-2.4.2: reiserfs_dir_fsync has no
lock_kernel/unlock_kernel calls which are required by reiserfs journal
interface functions.  It causes reserfs_panic in any attempt to fsync a
directory (on SMP machines).

Bug report was related to qmail which likes to
fsync a directory.

This trivial fix cures the problem:

--- linux.old/fs/reiserfs/dir.c Fri Mar  2 14:48:12 2001
+++ linux/fs/reiserfs/dir.c     Fri Mar  2 14:49:31 2001
@@ -51,12 +51,16 @@
   int windex ;
   struct reiserfs_transaction_handle th ;

+  lock_kernel();
+
   journal_begin(&th, dentry->d_inode->i_sb, 1) ;
   windex = push_journal_writer("dir_fsync") ;
   reiserfs_prepare_for_journal(th.t_super, SB_BUFFER_WITH_SB(th.t_super), 1) ;
   journal_mark_dirty(&th, dentry->d_inode->i_sb, SB_BUFFER_WITH_SB (dentry->d_inode->i_sb)) ;
   pop_journal_writer(windex) ;
   journal_end_sync(&th, dentry->d_inode->i_sb, 1) ;
+
+  unlock_kernel();

   return ret ;
 }


Regards,
Alex.


                 reply	other threads:[~2001-03-02 16:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010302195452.A2133@crimson.namesys.com \
    --to=zam@namesys.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-list@namesys.com \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®