From e53e843a6720c75f1ee029faa802b3d6b6fc5306 Mon Sep 17 00:00:00 2001
From: tianzy <tianzy>
Date: Tue, 4 Nov 2008 07:28:35 +0000
Subject: [PATCH] Branch b1_6 Replace LBUG with RETURN(-EINVAL) to avoid
 crashing b=5135 i=adilger i=johann

---
 lustre/llite/file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lustre/llite/file.c b/lustre/llite/file.c
index dfa5ad9077..be0592e954 100644
--- a/lustre/llite/file.c
+++ b/lustre/llite/file.c
@@ -2833,7 +2833,7 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
                 break;
         default:
                 CERROR("unknown fcntl lock type: %d\n", file_lock->fl_type);
-                LBUG();
+                RETURN (-EINVAL);
         }
 
         switch (cmd) {
@@ -2860,7 +2860,7 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
                 break;
         default:
                 CERROR("unknown fcntl lock command: %d\n", cmd);
-                LBUG();
+                RETURN (-EINVAL);
         }
 
         CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, "
-- 
GitLab